aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/test.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/test.lux
parente64b6d0114c26a455e19a416b5f02a4d19dd711f (diff)
Re-named wrap => in && unwrap => out.
Diffstat (limited to 'stdlib/source/test/aedifex/command/test.lux')
-rw-r--r--stdlib/source/test/aedifex/command/test.lux98
1 files changed, 49 insertions, 49 deletions
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index 5882992a9..93c6642f7 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -61,55 +61,55 @@
($_ _.and
(let [fs (file.mock (\ file.default separator))
console (@version.echo "")]
- (wrap (do async.monad
- [verdict (do ///action.monad
- [_ (/.do! console (program.async (program.mock environment.empty home working_directory))
- fs (shell.async (@build.good_shell [])) resolution
- (set@ #///.compiler compiler profile))
- build_start (\ console read_line [])
- build_end (\ console read_line [])
- test_start (\ console read_line [])
- test_end (\ console read_line [])]
- (wrap (and (and (text\= //build.start build_start)
- (text\= //build.success build_end))
- (and (text\= /.start test_start)
- (text\= /.success test_end)))))]
- (_.cover' [/.do!
- /.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.async (@build.good_shell [])) resolution
+ (set@ #///.compiler compiler profile))
+ build_start (\ console read_line [])
+ build_end (\ console read_line [])
+ test_start (\ console read_line [])
+ test_end (\ console read_line [])]
+ (in (and (and (text\= //build.start build_start)
+ (text\= //build.success build_end))
+ (and (text\= /.start test_start)
+ (text\= /.success test_end)))))]
+ (_.cover' [/.do!
+ /.start /.success]
+ (try.default false verdict)))))
(let [fs (file.mock (\ file.default separator))
console (@version.echo "")]
- (wrap (do async.monad
- [verdict (do ///action.monad
- [#let [bad_shell (shell.mock
- (function (_ [actual_environment actual_working_directory actual_command actual_arguments])
- (#try.Success
- (: (shell.Mock [])
- (implementation
- (def: (on_read state)
- (exception.throw shell.no_more_output []))
- (def: (on_error state)
- (exception.throw shell.no_more_output []))
- (def: (on_write input state)
- (#try.Failure "on_write"))
- (def: (on_destroy state)
- (#try.Failure "on_destroy"))
- (def: (on_await state)
- (#try.Success [state (if (list.any? (text\= "build") actual_arguments)
- shell.normal
- shell.error)]))))))
- [])]
- _ (/.do! console (program.async (program.mock environment.empty home working_directory))
- fs (shell.async bad_shell) resolution
- (set@ #///.compiler compiler profile))
- build_start (\ console read_line [])
- build_end (\ console read_line [])
- test_start (\ console read_line [])
- test_end (\ console read_line [])]
- (wrap (and (and (text\= //build.start build_start)
- (text\= //build.success build_end))
- (and (text\= /.start test_start)
- (text\= /.failure test_end)))))]
- (_.cover' [/.failure]
- (try.default false verdict)))))
+ (in (do async.monad
+ [verdict (do ///action.monad
+ [#let [bad_shell (shell.mock
+ (function (_ [actual_environment actual_working_directory actual_command actual_arguments])
+ (#try.Success
+ (: (shell.Mock [])
+ (implementation
+ (def: (on_read state)
+ (exception.except shell.no_more_output []))
+ (def: (on_error state)
+ (exception.except shell.no_more_output []))
+ (def: (on_write input state)
+ (#try.Failure "on_write"))
+ (def: (on_destroy state)
+ (#try.Failure "on_destroy"))
+ (def: (on_await state)
+ (#try.Success [state (if (list.any? (text\= "build") actual_arguments)
+ shell.normal
+ shell.error)]))))))
+ [])]
+ _ (/.do! console (program.async (program.mock environment.empty home working_directory))
+ fs (shell.async bad_shell) resolution
+ (set@ #///.compiler compiler profile))
+ build_start (\ console read_line [])
+ build_end (\ console read_line [])
+ test_start (\ console read_line [])
+ test_end (\ console read_line [])]
+ (in (and (and (text\= //build.start build_start)
+ (text\= //build.success build_end))
+ (and (text\= /.start test_start)
+ (text\= /.failure test_end)))))]
+ (_.cover' [/.failure]
+ (try.default false verdict)))))
))))