From dda05bca0956af5e5b3875c4cc36e61aa04772e4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 12 Sep 2021 00:07:08 -0400 Subject: Made the "#" character great again! --- stdlib/source/test/aedifex/command/auto.lux | 16 +++--- stdlib/source/test/aedifex/command/build.lux | 78 +++++++++++++------------- stdlib/source/test/aedifex/command/clean.lux | 2 +- stdlib/source/test/aedifex/command/deploy.lux | 14 ++--- stdlib/source/test/aedifex/command/deps.lux | 28 ++++----- stdlib/source/test/aedifex/command/install.lux | 12 ++-- stdlib/source/test/aedifex/command/pom.lux | 10 ++-- stdlib/source/test/aedifex/command/test.lux | 16 +++--- stdlib/source/test/aedifex/command/version.lux | 4 +- 9 files changed, 90 insertions(+), 90 deletions(-) (limited to 'stdlib/source/test/aedifex/command') diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 57aca92d2..307946212 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 @@ -77,14 +77,14 @@ .let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ #///.target target)) + (with@ ///.#target target)) with_program (: (-> Profile Profile) - (with@ #///.program {#.Some program})) + (with@ ///.#program {.#Some program})) profile (|> empty_profile with_program with_target - (with@ #///.sources (set.of_list text.hash (list source))))] + (with@ ///.#sources (set.of_list text.hash (list source))))] home (random.ascii/alpha 5) working_directory (random.ascii/alpha 5) @@ -103,23 +103,23 @@ _ (\ watcher poll [])] (do [! async.monad] [no_dangling_process! (|> profile - (with@ #///.compiler compiler) + (with@ ///.#compiler compiler) ((/.do! 1 watcher command) ($version.echo "") (program.async (program.mock environment.empty home working_directory)) 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! + (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 1376d440a..ee69f1010 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -41,85 +41,85 @@ (-> 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) (exception.except shell.no_more_output [])) - (def: (on_error state) + (def: (on_fail 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) (exception.except shell.no_more_output [])) - (def: (on_error state) + (def: (on_fail 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 + {.#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 + {.#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) (do random.monad [lux_version (random.ascii/alpha 5) - .let [js_compiler [#///dependency.artifact [#///artifact.group /.lux_group - #///artifact.name /.js_compiler_name - #///artifact.version lux_version] - #///dependency.type ///artifact/type.js_library]]] + .let [js_compiler [///dependency.#artifact [///artifact.#group /.lux_group + ///artifact.#name /.js_compiler_name + ///artifact.#version lux_version] + ///dependency.#type ///artifact/type.js_library]]] (`` ($_ random.either (in js_compiler) (~~ (template [] - [(in [#///dependency.artifact [#///artifact.group /.lux_group - #///artifact.name - #///artifact.version lux_version] - #///dependency.type ///artifact/type.lux_library])] + [(in [///dependency.#artifact [///artifact.#group /.lux_group + ///artifact.#name + ///artifact.#version lux_version] + ///dependency.#type ///artifact/type.lux_library])] [/.jvm_compiler_name] [/.python_compiler_name] @@ -151,9 +151,9 @@ .let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ #///.target target)) + (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 "")] @@ -185,7 +185,7 @@ [verdict (do ///action.monad [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs shell resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) start (\ console read_line []) end (\ console read_line [])] (in (and (text\= /.start start) @@ -207,7 +207,7 @@ [verdict (do ///action.monad [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async (..bad_shell [])) resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) start (\ console read_line []) end (\ console read_line [])] (in (and (text\= /.start start) @@ -232,12 +232,12 @@ 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)))] + {try.#Success})))] (in (and (text\= expected/0 actual/0) (text\= expected/1 actual/1) (text\= expected/2 actual/2) diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index 83c3e5a80..7d3e57392 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -103,7 +103,7 @@ context_exists!/pre (..directory_exists? fs context) target_exists!/pre (..assets_exist? fs target_path direct_files) sub_exists!/pre (..assets_exist? fs sub_path sub_files) - _ (/.do! console fs (with@ #///.target target_path dummy)) + _ (/.do! console fs (with@ ///.#target target_path dummy)) context_exists!/post (..directory_exists? fs context) target_exists!/post (..assets_exist? fs target_path direct_files) sub_exists!/post (..assets_exist? fs sub_path sub_files) diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux index 219a2931b..0b0f8558b 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -55,7 +55,7 @@ (Async (Try Text))) (do ///action.monad [.let [console ($version.echo "")] - _ ($install.make_sources! fs (value@ #///.sources profile)) + _ ($install.make_sources! fs (value@ ///.#sources profile)) _ (/.do! console repository fs artifact profile)] (\ console read_line []))) @@ -66,7 +66,7 @@ [[artifact expected_pom profile] (random.one (function (_ profile) (do maybe.monad - [artifact (value@ #///.identity profile) + [artifact (value@ ///.#identity profile) expected_pom (try.maybe (///pom.write profile))] (in [artifact expected_pom profile]))) $profile.random) @@ -81,19 +81,19 @@ [verdict (do [! ///action.monad] [logging (..execute! program repository fs artifact profile) expected_library (|> profile - (value@ #///.sources) + (value@ ///.#sources) set.list (export.library fs) (\ ! each (format.result tar.writer))) - actual_pom (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.pom)) - actual_library (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.lux_library)) - actual_sha-1 (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1))) + actual_pom (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact ///artifact/extension.pom)) + actual_library (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact ///artifact/extension.lux_library)) + actual_sha-1 (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1))) actual_sha-1 (\ async.monad in (do try.monad [actual_sha-1 (\ utf8.codec decoded actual_sha-1)] (\ ///hash.sha-1_codec decoded actual_sha-1))) - actual_md5 (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5))) + actual_md5 (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5))) actual_md5 (\ async.monad in (do try.monad [actual_md5 (\ utf8.codec decoded actual_md5)] diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index 8cf0ea05c..037a8e119 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -67,31 +67,31 @@ [_ dependee_package] $///package.random [_ depender_package] $///package.random - .let [dependee [#///dependency.artifact dependee_artifact - #///dependency.type ///artifact/type.lux_library] - depender [#///dependency.artifact depender_artifact - #///dependency.type ///artifact/type.lux_library] + .let [dependee [///dependency.#artifact dependee_artifact + ///dependency.#type ///artifact/type.lux_library] + depender [///dependency.#artifact depender_artifact + ///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@ #///.dependencies (set.of_list ///dependency.hash (list dependee))) + (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.pom [dependee_pom + (with@ ///package.#origin {///repository/origin.#Remote ""}) + (with@ ///package.#pom [dependee_pom (|> dependee_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified])) + {///dependency/status.#Unverified}])) depender_package (|> depender_package - (with@ #///package.origin {#///repository/origin.Remote ""}) - (with@ #///package.pom [depender_pom + (with@ ///package.#origin {///repository/origin.#Remote ""}) + (with@ ///package.#pom [depender_pom (|> depender_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified])) + {///dependency/status.#Unverified}])) fs (file.mock (\ file.default separator)) program (program.async (program.mock environment.empty home working_directory))]] @@ -103,7 +103,7 @@ (dictionary.has dependee dependee_package) (///dependency/deployment.all local)) post (|> (\ ///.monoid identity) - (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee depender))) + (with@ ///.#dependencies (set.of_list ///dependency.hash (list dependee depender))) (/.do! console local (list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package) [])) diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index ac1a87be1..0461029fc 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -56,7 +56,7 @@ (-> (Program Async) (file.System Async) ///.Profile (Async (Try Text))) (do ///action.monad [.let [console ($version.echo "")] - _ (..make_sources! fs (value@ #///.sources sample)) + _ (..make_sources! fs (value@ ///.#sources sample)) _ (/.do! console fs (///repository/local.repository program fs) sample)] (\ console read_line []))) @@ -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) @@ -75,7 +75,7 @@ [.let [fs (file.mock /) program (program.async (program.mock environment.empty home working_directory)) - artifact_path (///local.uri (value@ #///artifact.version identity) identity) + artifact_path (///local.uri (value@ ///artifact.#version identity) identity) library_path (format artifact_path ///artifact/extension.lux_library) pom_path (format artifact_path ///artifact/extension.pom)] verdict (do [! ///action.monad] @@ -84,11 +84,11 @@ library_exists! (|> library_path (format home /) (\ fs file?) - (\ async.monad each (|>> #try.Success))) + (\ async.monad each (|>> {try.#Success}))) pom_exists! (|> pom_path (format home /) (\ fs file?) - (\ async.monad each (|>> #try.Success)))] + (\ async.monad each (|>> {try.#Success})))] (in (and succeeded! library_exists! pom_exists!)))] @@ -97,7 +97,7 @@ (in (do [! async.monad] [.let [fs (file.mock /) program (program.async (program.mock environment.empty home working_directory))] - logging (..execute! program fs (with@ #///.identity #.None sample))] + logging (..execute! program fs (with@ ///.#identity {.#None} sample))] (_.cover' [/.failure] (|> logging (try\each (text\= /.failure)) diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux index ac080c966..76cdf8b02 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,11 +60,11 @@ (_.cover' [/.do! /.success] (try.else false verdict))) - {#try.Failure error} + {try.#Failure error} (_.cover' [/.do!] - (case (value@ #///.identity sample) - {#.Some _} + (case (value@ ///.#identity sample) + {.#Some _} false - #.None + {.#None} true)))))))) diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux index 19ae5cd70..cee27dd27 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -50,9 +50,9 @@ .let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ #///.target target)) + (with@ ///.#target target)) with_test (: (-> Profile Profile) - (with@ #///.test {#.Some test})) + (with@ ///.#test {.#Some test})) profile (|> empty_profile with_test @@ -65,7 +65,7 @@ [verdict (do ///action.monad [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async (@build.good_shell [])) resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) build_start (\ console read_line []) build_end (\ console read_line []) test_start (\ console read_line []) @@ -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,17 +91,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 (if (list.any? (text\= "build") actual_arguments) + {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 - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) build_start (\ console read_line []) build_end (\ console read_line []) test_start (\ console read_line []) diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index 6cd59b3a5..583e21fcd 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 -- cgit v1.2.3