diff options
author | Eduardo Julian | 2021-09-10 01:21:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-10 01:21:23 -0400 |
commit | cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 (patch) | |
tree | af6366578f98f1a8e551f4da9f3ad230fd63a4dd /stdlib/source/test/aedifex/command | |
parent | ef77466323f85a3d1b65b46a3deb93652ef22085 (diff) |
Migrated variants to the new syntax.
Diffstat (limited to 'stdlib/source/test/aedifex/command')
-rw-r--r-- | stdlib/source/test/aedifex/command/auto.lux | 12 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/build.lux | 46 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/deps.lux | 8 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/install.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/pom.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/test.lux | 12 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/version.lux | 4 |
7 files changed, 45 insertions, 45 deletions
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 4511d8a03..57aca92d2 100644 --- a/stdlib/source/test/aedifex/command/auto.lux +++ b/stdlib/source/test/aedifex/command/auto.lux @@ -55,7 +55,7 @@ (do [! async.monad] [[_ actual_runs] (async.future (atom.update! ++ @runs))] (if (n.= expected_runs actual_runs) - (in (#try.Failure end_signal)) + (in {#try.Failure end_signal}) (do (try.with !) [_ (\ fs write (\ utf8.codec encoded (%.nat actual_runs)) dummy_file) _ (\ fs modify @@ -79,7 +79,7 @@ with_target (: (-> Profile Profile) (with@ #///.target target)) with_program (: (-> Profile Profile) - (with@ #///.program (#.Some program))) + (with@ #///.program {#.Some program})) profile (|> empty_profile with_program @@ -110,17 +110,17 @@ fs (shell.async ($build.good_shell [])) resolution) - (\ ! each (|>> (case> (#try.Failure error) + (\ ! each (|>> (case> {#try.Failure error} (same? end_signal error) - (#try.Success _) + {#try.Success _} false)))) correct_number_of_runs! (|> @runs atom.read! async.future (\ ! each (n.= expected_runs)))] - (in (#try.Success (and correct_number_of_runs! - no_dangling_process!)))))] + (in {#try.Success (and correct_number_of_runs! + no_dangling_process!)})))] (_.cover' [/.do!] (try.else false verdict)))) )))) diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index c856b11f5..1376d440a 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -41,7 +41,7 @@ (-> Any (Shell IO)) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock []) (implementation (def: (on_read state) @@ -49,17 +49,17 @@ (def: (on_error state) (exception.except shell.no_more_output [])) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state shell.normal])))))))) + {#try.Success [state shell.normal]})))}))) (def: .public bad_shell (-> Any (Shell IO)) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock []) (implementation (def: (on_read state) @@ -67,43 +67,43 @@ (def: (on_error state) (exception.except shell.no_more_output [])) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state shell.error])))))))) + {#try.Success [state shell.error]})))}))) (def: .public (reader_shell error?) (-> Bit (-> (List Text) (Shell IO))) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock (List Text)) (implementation (def: (on_read state) (if error? (exception.except shell.no_more_output []) (case state - (#.Item head tail) - (#try.Success [tail head]) + {#.Item head tail} + {#try.Success [tail head]} #.End (exception.except shell.no_more_output [])))) (def: (on_error state) (if error? (case state - (#.Item head tail) - (#try.Success [tail head]) + {#.Item head tail} + {#try.Success [tail head]} #.End (exception.except shell.no_more_output [])) (exception.except shell.no_more_output []))) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state shell.error])))))))) + {#try.Success [state shell.error]})))}))) (def: compiler (Random Dependency) @@ -153,7 +153,7 @@ with_target (: (-> Profile Profile) (with@ #///.target target)) with_program (: (-> Profile Profile) - (with@ #///.program (#.Some program))) + (with@ #///.program {#.Some program})) profile (|> empty_profile with_program @@ -164,19 +164,19 @@ (with_target empty_profile))] (_.cover' [/.no_specified_program] (case outcome - (#try.Success _) + {#try.Success _} false - (#try.Failure error) + {#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 _) + {#try.Success _} false - (#try.Failure error) + {#try.Failure error} (exception.match? /.no_available_compiler error))))) (do ! [.let [console (@version.echo "")] @@ -232,10 +232,10 @@ actual/1 (\ console read_line []) actual/2 (\ console read_line []) end! (|> (\ console read_line []) - (\ ! each (|>> (case> (#try.Failure error) + (\ ! each (|>> (case> {#try.Failure error} true - (#try.Success _) + {#try.Success _} false) #try.Success)))] (in (and (text\= expected/0 actual/0) diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index 3d563f540..8cf0ea05c 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -73,22 +73,22 @@ #///dependency.type ///artifact/type.lux_library] dependee_pom (|> (\ ///.monoid identity) - (with@ #///.identity (#.Some dependee_artifact)) + (with@ #///.identity {#.Some dependee_artifact}) ///pom.write try.trusted) depender_pom (|> (\ ///.monoid identity) - (with@ #///.identity (#.Some depender_artifact)) + (with@ #///.identity {#.Some depender_artifact}) (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee))) ///pom.write try.trusted) dependee_package (|> dependee_package - (with@ #///package.origin (#///repository/origin.Remote "")) + (with@ #///package.origin {#///repository/origin.Remote ""}) (with@ #///package.pom [dependee_pom (|> dependee_pom (\ xml.codec encoded) (\ utf8.codec encoded)) #///dependency/status.Unverified])) depender_package (|> depender_package - (with@ #///package.origin (#///repository/origin.Remote "")) + (with@ #///package.origin {#///repository/origin.Remote ""}) (with@ #///package.pom [depender_pom (|> depender_pom (\ xml.codec encoded) (\ utf8.codec encoded)) #///dependency/status.Unverified])) diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index 8ef29ec92..ac1a87be1 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -65,7 +65,7 @@ (<| (_.covering /._) (do [! random.monad] [identity $artifact.random - sample (\ ! each (with@ #///.identity (#.Some identity)) + sample (\ ! each (with@ #///.identity {#.Some identity}) $profile.random) home (random.ascii/alpha 5) working_directory (random.ascii/alpha 5) diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux index 80676974b..ac080c966 100644 --- a/stdlib/source/test/aedifex/command/pom.lux +++ b/stdlib/source/test/aedifex/command/pom.lux @@ -40,7 +40,7 @@ [.let [console (@version.echo "")] outcome (/.do! console fs sample)] (case outcome - (#try.Success _) + {#try.Success _} (do ! [verdict (do ///action.monad [expected (|> (///pom.write sample) @@ -60,10 +60,10 @@ (_.cover' [/.do! /.success] (try.else false verdict))) - (#try.Failure error) + {#try.Failure error} (_.cover' [/.do!] (case (value@ #///.identity sample) - (#.Some _) + {#.Some _} false #.None diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux index bbcb582b1..19ae5cd70 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -52,7 +52,7 @@ with_target (: (-> Profile Profile) (with@ #///.target target)) with_test (: (-> Profile Profile) - (with@ #///.test (#.Some test))) + (with@ #///.test {#.Some test})) profile (|> empty_profile with_test @@ -83,7 +83,7 @@ [verdict (do ///action.monad [.let [bad_shell (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - (#try.Success + {#try.Success (: (shell.Mock []) (implementation (def: (on_read state) @@ -91,13 +91,13 @@ (def: (on_error state) (exception.except shell.no_more_output [])) (def: (on_write input state) - (#try.Failure "on_write")) + {#try.Failure "on_write"}) (def: (on_destroy state) - (#try.Failure "on_destroy")) + {#try.Failure "on_destroy"}) (def: (on_await state) - (#try.Success [state (if (list.any? (text\= "build") actual_arguments) + {#try.Success [state (if (list.any? (text\= "build") actual_arguments) shell.normal - shell.error)])))))) + shell.error)]})))}) [])] _ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async bad_shell) resolution diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index 1b2b0aa53..6cd59b3a5 100644 --- a/stdlib/source/test/aedifex/command/version.lux +++ b/stdlib/source/test/aedifex/command/version.lux @@ -50,11 +50,11 @@ (exception.except ..console_is_closed! []))) (def: (on_write input [open? state]) (if open? - (#try.Success [open? (format state input)]) + {#try.Success [open? (format state input)]} (exception.except ..console_is_closed! []))) (def: (on_close [open? buffer]) (if open? - (#try.Success [false buffer]) + {#try.Success [false buffer]} (exception.except ..console_is_closed! [])))) (def: .public echo |