From 4ca397765805eda5ddee393901ed3a02001a960a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 25 Dec 2020 09:22:38 -0400 Subject: Replaced kebab-case with snake_case for naming convention. --- stdlib/source/test/aedifex/command/test.lux | 74 ++++++++++++++--------------- 1 file changed, 37 insertions(+), 37 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 b63662bc0..2d077ab87 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -45,32 +45,32 @@ [program (random.ascii/alpha 5) target (random.ascii/alpha 5) home (random.ascii/alpha 5) - working-directory (random.ascii/alpha 5) - #let [empty-profile (: Profile + working_directory (random.ascii/alpha 5) + #let [empty_profile (: Profile (\ ///.monoid identity)) - with-target (: (-> Profile Profile) + with_target (: (-> Profile Profile) (set@ #///.target (#.Some target))) - with-program (: (-> Profile Profile) + with_program (: (-> Profile Profile) (set@ #///.program (#.Some program))) - profile (|> empty-profile - with-program - with-target)] + profile (|> empty_profile + with_program + with_target)] resolution @build.resolution] ($_ _.and (let [fs (file.mock (\ file.default separator)) console (@version.echo "")] (wrap (do promise.monad [verdict (do ///action.monad - [_ (/.do! console (program.async (program.mock environment.empty home working-directory)) fs (@build.good-shell []) resolution profile) - build-start (!.use (\ console read-line) []) - build-end (!.use (\ console read-line) []) - test-start (!.use (\ console read-line) []) - test-end (!.use (\ 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)))))] + [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (@build.good_shell []) resolution profile) + build_start (!.use (\ console read_line) []) + build_end (!.use (\ console read_line) []) + test_start (!.use (\ console read_line) []) + test_end (!.use (\ 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))))) @@ -78,33 +78,33 @@ console (@version.echo "")] (wrap (do promise.monad [verdict (do ///action.monad - [#let [bad-shell (shell.mock - (function (_ [actual-environment actual-working-directory actual-command actual-arguments]) + [#let [bad_shell (shell.mock + (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) (#try.Success (: (shell.Simulation []) (structure - (def: (on-read state) - (#try.Failure "on-read")) - (def: (on-error state) - (#try.Failure "on-error")) - (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 (text.ends-with? " build" actual-command) + (def: (on_read state) + (#try.Failure "on_read")) + (def: (on_error state) + (#try.Failure "on_error")) + (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 (text.ends_with? " build" actual_command) shell.normal shell.error)])))))) [])] - _ (/.do! console (program.async (program.mock environment.empty home working-directory)) fs bad-shell resolution profile) - build-start (!.use (\ console read-line) []) - build-end (!.use (\ console read-line) []) - test-start (!.use (\ console read-line) []) - test-end (!.use (\ 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)))))] + _ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs bad_shell resolution profile) + build_start (!.use (\ console read_line) []) + build_end (!.use (\ console read_line) []) + test_start (!.use (\ console read_line) []) + test_end (!.use (\ 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))))) )))) -- cgit v1.2.3