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/build.lux | 118 +++++++++++++-------------- 1 file changed, 59 insertions(+), 59 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 025d01c0b..8a4df9a7e 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -36,55 +36,55 @@ ["#." dependency ["#/." resolution]]]]}) -(def: #export good-shell +(def: #export good_shell (-> Any (Shell Promise)) (shell.mock - (function (_ [actual-environment actual-working-directory actual-command actual-arguments]) + (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) + (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 shell.normal])))))))) -(def: #export bad-shell +(def: #export bad_shell (-> Any (Shell Promise)) (shell.mock - (function (_ [actual-environment actual-working-directory actual-command actual-arguments]) + (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) + (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 shell.error])))))))) (def: compiler (do random.monad - [lux-version (random.ascii/alpha 5) - #let [jvm-compiler {#///dependency.artifact {#///artifact.group /.lux-group - #///artifact.name /.jvm-compiler-name - #///artifact.version lux-version} - #///dependency.type ///artifact/type.lux-library} - js-compiler {#///dependency.artifact {#///artifact.group /.lux-group - #///artifact.name /.js-compiler-name - #///artifact.version lux-version} - #///dependency.type ///artifact/type.lux-library}]] - (random.either (wrap jvm-compiler) - (wrap js-compiler)))) + [lux_version (random.ascii/alpha 5) + #let [jvm_compiler {#///dependency.artifact {#///artifact.group /.lux_group + #///artifact.name /.jvm_compiler_name + #///artifact.version lux_version} + #///dependency.type ///artifact/type.lux_library} + js_compiler {#///dependency.artifact {#///artifact.group /.lux_group + #///artifact.name /.js_compiler_name + #///artifact.version lux_version} + #///dependency.type ///artifact/type.lux_library}]] + (random.either (wrap jvm_compiler) + (wrap js_compiler)))) (def: #export resolution (do random.monad @@ -98,63 +98,63 @@ (<| (_.covering /._) (do {! random.monad} [#let [fs (file.mock (\ file.default separator)) - shell (..good-shell [])] + shell (..good_shell [])] 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)]] ($_ _.and (wrap (do promise.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] + [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))))) + (exception.match? /.no_specified_program error))))) (wrap (do promise.monad - [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working-directory)) fs shell ///dependency/resolution.empty - (with-program empty-profile))] - (_.cover' [/.no-specified-target] + [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty + (with_program empty_profile))] + (_.cover' [/.no_specified_target] (case outcome (#try.Success _) false (#try.Failure error) - (exception.match? /.no-specified-target error))))) + (exception.match? /.no_specified_target error))))) (wrap (do promise.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] + [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))))) + (exception.match? /.no_available_compiler error))))) (do ! [#let [console (@version.echo "")] resolution ..resolution] (wrap (do promise.monad [verdict (do ///action.monad - [_ (/.do! console (program.async (program.mock environment.empty home working-directory)) fs shell resolution profile) - start (!.use (\ console read-line) []) - end (!.use (\ console read-line) [])] + [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs shell resolution profile) + start (!.use (\ console read_line) []) + end (!.use (\ console read_line) [])] (wrap (and (text\= /.start start) (text\= /.success end))))] (_.cover' [/.do! - /.lux-group /.jvm-compiler-name /.js-compiler-name + /.lux_group /.jvm_compiler_name /.js_compiler_name /.start /.success] (try.default false verdict))))) (do ! @@ -162,9 +162,9 @@ resolution ..resolution] (wrap (do promise.monad [verdict (do ///action.monad - [_ (/.do! console (program.async (program.mock environment.empty home working-directory)) fs (..bad-shell []) resolution profile) - start (!.use (\ console read-line) []) - end (!.use (\ console read-line) [])] + [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (..bad_shell []) resolution profile) + start (!.use (\ console read_line) []) + end (!.use (\ console read_line) [])] (wrap (and (text\= /.start start) (text\= /.failure end))))] (_.cover' [/.failure] -- cgit v1.2.3