From 061fd8a209bbcaffc2bfb850ac6046752a567d50 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 27 Jul 2021 03:51:10 -0400 Subject: Re-named wrap => in && unwrap => out. --- stdlib/source/test/aedifex/command/build.lux | 166 +++++++++++++-------------- 1 file changed, 83 insertions(+), 83 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 3bc7f86dc..141573f6f 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -45,9 +45,9 @@ (: (shell.Mock []) (implementation (def: (on_read state) - (exception.throw shell.no_more_output [])) + (exception.except shell.no_more_output [])) (def: (on_error state) - (exception.throw shell.no_more_output [])) + (exception.except shell.no_more_output [])) (def: (on_write input state) (#try.Failure "on_write")) (def: (on_destroy state) @@ -63,9 +63,9 @@ (: (shell.Mock []) (implementation (def: (on_read state) - (exception.throw shell.no_more_output [])) + (exception.except shell.no_more_output [])) (def: (on_error state) - (exception.throw shell.no_more_output [])) + (exception.except shell.no_more_output [])) (def: (on_write input state) (#try.Failure "on_write")) (def: (on_destroy state) @@ -82,13 +82,13 @@ (implementation (def: (on_read state) (if error? - (exception.throw shell.no_more_output []) + (exception.except shell.no_more_output []) (case state (#.Cons head tail) (#try.Success [tail head]) #.Nil - (exception.throw shell.no_more_output [])))) + (exception.except shell.no_more_output [])))) (def: (on_error state) (if error? (case state @@ -96,8 +96,8 @@ (#try.Success [tail head]) #.Nil - (exception.throw shell.no_more_output [])) - (exception.throw shell.no_more_output []))) + (exception.except shell.no_more_output [])) + (exception.except shell.no_more_output []))) (def: (on_write input state) (#try.Failure "on_write")) (def: (on_destroy state) @@ -114,12 +114,12 @@ #///artifact.version lux_version} #///dependency.type ///artifact/type.js_library}]] (`` ($_ random.either - (wrap js_compiler) + (in js_compiler) (~~ (template [] - [(wrap {#///dependency.artifact {#///artifact.group /.lux_group - #///artifact.name - #///artifact.version lux_version} - #///dependency.type ///artifact/type.lux_library})] + [(in {#///dependency.artifact {#///artifact.group /.lux_group + #///artifact.name + #///artifact.version lux_version} + #///dependency.type ///artifact/type.lux_library})] [/.jvm_compiler_name] [/.python_compiler_name] @@ -132,9 +132,9 @@ (do random.monad [dependency ..compiler [_ package] $///package.random] - (wrap [dependency - (|> ///dependency/resolution.empty - (dictionary.put dependency package))]))) + (in [dependency + (|> ///dependency/resolution.empty + (dictionary.put dependency package))]))) (def: #export test Test @@ -159,61 +159,61 @@ with_program with_target)]] ($_ _.and - (wrap (do async.monad - [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty - (with_target empty_profile))] - (_.cover' [/.no_specified_program] - (case outcome - (#try.Success _) - false + (in (do async.monad + [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty + (with_target empty_profile))] + (_.cover' [/.no_specified_program] + (case outcome + (#try.Success _) + false - (#try.Failure error) - (exception.match? /.no_specified_program error))))) - (wrap (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 _) - false + (#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 _) + false - (#try.Failure error) - (exception.match? /.no_available_compiler error))))) + (#try.Failure error) + (exception.match? /.no_available_compiler error))))) (do ! [#let [console (@version.echo "")] [compiler resolution] ..resolution] - (wrap (do async.monad - [verdict (do ///action.monad - [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) - fs shell resolution - (set@ #///.compiler compiler profile)) - start (\ console read_line []) - end (\ console read_line [])] - (wrap (and (text\= /.start start) - (text\= /.success end))))] - (_.cover' [/.do! - /.lux_group - /.jvm_compiler_name - /.js_compiler_name - /.python_compiler_name - /.lua_compiler_name - /.ruby_compiler_name - /.start - /.success] - (try.default false verdict))))) + (in (do async.monad + [verdict (do ///action.monad + [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) + fs shell resolution + (set@ #///.compiler compiler profile)) + start (\ console read_line []) + end (\ console read_line [])] + (in (and (text\= /.start start) + (text\= /.success end))))] + (_.cover' [/.do! + /.lux_group + /.jvm_compiler_name + /.js_compiler_name + /.python_compiler_name + /.lua_compiler_name + /.ruby_compiler_name + /.start + /.success] + (try.default false verdict))))) (do ! [#let [console (@version.echo "")] [compiler resolution] ..resolution] - (wrap (do async.monad - [verdict (do ///action.monad - [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) - fs (shell.async (..bad_shell [])) resolution - (set@ #///.compiler compiler profile)) - start (\ console read_line []) - end (\ console read_line [])] - (wrap (and (text\= /.start start) - (text\= /.failure end))))] - (_.cover' [/.failure] - (try.default false verdict))))) + (in (do async.monad + [verdict (do ///action.monad + [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) + fs (shell.async (..bad_shell [])) resolution + (set@ #///.compiler compiler profile)) + start (\ console read_line []) + end (\ console read_line [])] + (in (and (text\= /.start start) + (text\= /.failure end))))] + (_.cover' [/.failure] + (try.default false verdict))))) (do ! [expected/0 (random.ascii/alpha 5) expected/1 (random.ascii/alpha 5) @@ -224,26 +224,26 @@ shell (|> (list expected/0 expected/1 expected/2) (..reader_shell ) shell.async)] - (wrap (do {! async.monad} - [verdict (do ///action.monad - [process (shell [environment.empty working_directory "" (list "")]) - _ ( console process) - actual/0 (\ console read_line []) - actual/1 (\ console read_line []) - actual/2 (\ console read_line []) - end! (|> (\ console read_line []) - (\ ! map (|>> (case> (#try.Failure error) - true - - (#try.Success _) - false) - #try.Success)))] - (wrap (and (text\= expected/0 actual/0) - (text\= expected/1 actual/1) - (text\= expected/2 actual/2) - end!)))] - (_.cover' [] - (try.default false verdict)))))] + (in (do {! async.monad} + [verdict (do ///action.monad + [process (shell [environment.empty working_directory "" (list "")]) + _ ( console process) + actual/0 (\ console read_line []) + actual/1 (\ console read_line []) + actual/2 (\ console read_line []) + end! (|> (\ console read_line []) + (\ ! map (|>> (case> (#try.Failure error) + true + + (#try.Success _) + false) + #try.Success)))] + (in (and (text\= expected/0 actual/0) + (text\= expected/1 actual/1) + (text\= expected/2 actual/2) + end!)))] + (_.cover' [] + (try.default false verdict)))))] [#0 /.log_output!] [#1 /.log_error!] -- cgit v1.2.3