From cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 10 Sep 2021 01:21:23 -0400 Subject: Migrated variants to the new syntax. --- stdlib/source/test/aedifex/command/build.lux | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'stdlib/source/test/aedifex/command/build.lux') diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index c856b11f5..1376d440a 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -41,7 +41,7 @@ (-> Any (Shell IO)) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock []) (implementation (def: (on_read state) @@ -49,17 +49,17 @@ (def: (on_error state) (exception.except shell.no_more_output [])) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state shell.normal])))))))) + {#try.Success [state shell.normal]})))}))) (def: .public bad_shell (-> Any (Shell IO)) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock []) (implementation (def: (on_read state) @@ -67,43 +67,43 @@ (def: (on_error state) (exception.except shell.no_more_output [])) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state shell.error])))))))) + {#try.Success [state shell.error]})))}))) (def: .public (reader_shell error?) (-> Bit (-> (List Text) (Shell IO))) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock (List Text)) (implementation (def: (on_read state) (if error? (exception.except shell.no_more_output []) (case state - (#.Item head tail) - (#try.Success [tail head]) + {#.Item head tail} + {#try.Success [tail head]} #.End (exception.except shell.no_more_output [])))) (def: (on_error state) (if error? (case state - (#.Item head tail) - (#try.Success [tail head]) + {#.Item head tail} + {#try.Success [tail head]} #.End (exception.except shell.no_more_output [])) (exception.except shell.no_more_output []))) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state shell.error])))))))) + {#try.Success [state shell.error]})))}))) (def: compiler (Random Dependency) @@ -153,7 +153,7 @@ with_target (: (-> Profile Profile) (with@ #///.target target)) with_program (: (-> Profile Profile) - (with@ #///.program (#.Some program))) + (with@ #///.program {#.Some program})) profile (|> empty_profile with_program @@ -164,19 +164,19 @@ (with_target empty_profile))] (_.cover' [/.no_specified_program] (case outcome - (#try.Success _) + {#try.Success _} false - (#try.Failure error) + {#try.Failure error} (exception.match? /.no_specified_program error))))) (in (do async.monad [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty profile)] (_.cover' [/.Compiler /.no_available_compiler] (case outcome - (#try.Success _) + {#try.Success _} false - (#try.Failure error) + {#try.Failure error} (exception.match? /.no_available_compiler error))))) (do ! [.let [console (@version.echo "")] @@ -232,10 +232,10 @@ actual/1 (\ console read_line []) actual/2 (\ console read_line []) end! (|> (\ console read_line []) - (\ ! each (|>> (case> (#try.Failure error) + (\ ! each (|>> (case> {#try.Failure error} true - (#try.Success _) + {#try.Success _} false) #try.Success)))] (in (and (text\= expected/0 actual/0) -- cgit v1.2.3