aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/build.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-27 03:51:10 -0400
committerEduardo Julian2021-07-27 03:51:10 -0400
commit061fd8a209bbcaffc2bfb850ac6046752a567d50 (patch)
tree8cd83ad7d0bc06ded7976eb5420467e485733ae8 /stdlib/source/test/aedifex/command/build.lux
parente64b6d0114c26a455e19a416b5f02a4d19dd711f (diff)
Re-named wrap => in && unwrap => out.
Diffstat (limited to 'stdlib/source/test/aedifex/command/build.lux')
-rw-r--r--stdlib/source/test/aedifex/command/build.lux166
1 files changed, 83 insertions, 83 deletions
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 [<compiler>]
- [(wrap {#///dependency.artifact {#///artifact.group /.lux_group
- #///artifact.name <compiler>
- #///artifact.version lux_version}
- #///dependency.type ///artifact/type.lux_library})]
+ [(in {#///dependency.artifact {#///artifact.group /.lux_group
+ #///artifact.name <compiler>
+ #///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 <error?>)
shell.async)]
- (wrap (do {! async.monad}
- [verdict (do ///action.monad
- [process (shell [environment.empty working_directory "" (list "")])
- _ (<log!> 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' [<log!>]
- (try.default false verdict)))))]
+ (in (do {! async.monad}
+ [verdict (do ///action.monad
+ [process (shell [environment.empty working_directory "" (list "")])
+ _ (<log!> 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' [<log!>]
+ (try.default false verdict)))))]
[#0 /.log_output!]
[#1 /.log_error!]