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/test.lux | 98 ++++++++++++++--------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'stdlib/source/test/aedifex/command/test.lux') 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))))) )))) -- cgit v1.2.3