diff options
author | Eduardo Julian | 2021-09-12 00:07:08 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-12 00:07:08 -0400 |
commit | dda05bca0956af5e5b3875c4cc36e61aa04772e4 (patch) | |
tree | 0f8b27697d58ab5c8e41aba7c7c9f769d3800767 /stdlib/source/test/lux/world | |
parent | d48270f43c404ba19ca04da2553455ecaaf2caba (diff) |
Made the "#" character great again!
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/world/console.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/file/watch.lux | 14 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/input/keyboard.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/net/http/client.lux | 30 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/program.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/shell.lux | 42 |
6 files changed, 49 insertions, 49 deletions
diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux index eaf882016..f044be377 100644 --- a/stdlib/source/test/lux/world/console.lux +++ b/stdlib/source/test/lux/world/console.lux @@ -41,12 +41,12 @@ (def: (on_write message [dead? content]) (if dead? (exception.except ..dead []) - {#try.Success [dead? (format content message)]})) + {try.#Success [dead? (format content message)]})) (def: (on_close [dead? content]) (if dead? (exception.except ..dead []) - {#try.Success [true content]})))) + {try.#Success [true content]})))) (def: .public test Test diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 5ad722723..3e7b03015 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -76,16 +76,16 @@ ?stop (\ watcher stop directory)] (_.cover' [/.not_being_watched] (and (case ?concern - {#try.Failure error} + {try.#Failure error} (exception.match? /.not_being_watched error) - {#try.Success _} + {try.#Success _} false) (case ?stop - {#try.Failure error} + {try.#Failure error} (exception.match? /.not_being_watched error) - {#try.Success _} + {try.#Success _} false))))) ))) @@ -118,7 +118,7 @@ (def: (after_modification! fs watcher data expected_path) (-> (//.System Async) (/.Watcher Async) Binary //.Path (Async (Try Bit))) (do (try.with async.monad) - [_ (async.after 1 {#try.Success "Delay to make sure the over_write time-stamp always changes."}) + [_ (async.after 1 {try.#Success "Delay to make sure the over_write time-stamp always changes."}) _ (\ fs write data expected_path) poll/2 (\ watcher poll []) poll/2' (\ watcher poll [])] @@ -191,9 +191,9 @@ [started? ( \ watcher start /.all directory)] (_.cover' [/.cannot_poll_a_non_existent_directory] (case started? - {#try.Success _} + {try.#Success _} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.cannot_poll_a_non_existent_directory error)))))) ))) diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux index 7da4c9c34..192c406c1 100644 --- a/stdlib/source/test/lux/world/input/keyboard.lux +++ b/stdlib/source/test/lux/world/input/keyboard.lux @@ -160,8 +160,8 @@ [key ..random .let [sample (<function> key)]] (_.cover [<function>] - (and (bit\= <pressed?> (value@ #/.pressed? sample)) - (n.= key (value@ #/.input sample)))))] + (and (bit\= <pressed?> (value@ /.#pressed? sample)) + (n.= key (value@ /.#input sample)))))] [#0 /.release] [#1 /.press] diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index 9a789fd70..5160aae60 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -47,30 +47,30 @@ (implementation (def: (request method url headers data) (io.io (let [value (case method - #//.Post on_post - #//.Get on_get - #//.Put on_put - #//.Patch on_patch - #//.Delete on_delete - #//.Head on_head - #//.Connect on_connect - #//.Options on_options - #//.Trace on_trace) + {//.#Post} on_post + {//.#Get} on_get + {//.#Put} on_put + {//.#Patch} on_patch + {//.#Delete} on_delete + {//.#Head} on_head + {//.#Connect} on_connect + {//.#Options} on_options + {//.#Trace} on_trace) data (|> value (\ nat.decimal encoded) (\ utf8.codec encoded))] - {#try.Success [//status.ok - [#//.headers headers - #//.body (function (_ ?wanted_bytes) - (io.io {#try.Success [(binary.size data) + {try.#Success [//status.ok + [//.#headers headers + //.#body (function (_ ?wanted_bytes) + (io.io {try.#Success [(binary.size data) data]}))]]})))))]] (`` ($_ _.and (~~ (template [<definition> <expected>] [(_.cover [<definition>] - (|> (<definition> "" //.empty #.None mock) + (|> (<definition> "" //.empty {.#None} mock) (do> try.monad [io.run!] - [product.right (value@ #//.body) (function.on #.None) io.run!] + [product.right (value@ //.#body) (function.on {.#None}) io.run!] [product.right (\ utf8.codec decoded)] [(\ nat.decimal decoded)] [(nat.= <expected>) in]) diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux index c498a939b..e5909bcba 100644 --- a/stdlib/source/test/lux/world/program.lux +++ b/stdlib/source/test/lux/world/program.lux @@ -70,9 +70,9 @@ (|> unknown (\ program variable) io.run! - (case> {#try.Success _} + (case> {try.#Success _} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.unknown_environment_variable error))))) )))) diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux index daa0a5e11..c79a2fa14 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -41,51 +41,51 @@ [echo (try.of_maybe (list.head arguments))] (in [dead? echo])))) - (def: (on_error dead?) + (def: (on_fail dead?) (if dead? (exception.except ..dead []) - {#try.Success [dead? ""]})) + {try.#Success [dead? ""]})) (def: (on_write message dead?) (if dead? (exception.except ..dead []) - {#try.Success dead?})) + {try.#Success dead?})) (def: (on_destroy dead?) (if dead? (exception.except ..dead []) - {#try.Success true})) + {try.#Success true})) (def: (on_await dead?) (if dead? (exception.except ..dead []) - {#try.Success [true /.normal]})))) + {try.#Success [true /.normal]})))) (def: (io_shell command oops input destruction exit) (-> /.Command Text Text Text /.Exit (/.Shell IO)) (implementation (def: (execute [environment working_directory command arguments]) (<| io.io - #try.Success + {try.#Success} (: (/.Process IO)) (implementation (def: (read _) - (io.io {#try.Success command})) - (def: (error _) - (io.io {#try.Success oops})) + (io.io {try.#Success command})) + (def: (fail _) + (io.io {try.#Success oops})) (def: (write message) - (io.io {#try.Failure message})) + (io.io {try.#Failure message})) (def: (destroy _) - (io.io {#try.Failure destruction})) + (io.io {try.#Failure destruction})) (def: (await _) - (io.io {#try.Success exit}))))))) + (io.io {try.#Success exit}))))))) (def: .public test Test (<| (_.covering /._) ($_ _.and (_.for [/.async /.mock /.Mock] - ($/.spec (/.async (/.mock (|>> ..mock #try.Success) + ($/.spec (/.async (/.mock (|>> ..mock {try.#Success}) false)))) (_.cover [/.error] (not (i.= /.normal /.error))) @@ -100,26 +100,26 @@ [verdict (do (try.with !) [process (\ shell execute [environment.empty "~" command (list)]) read (\ process read []) - error (\ process error []) + failure (\ process fail []) wrote! (do ! [write (\ process write input)] - (in {#try.Success (case write - {#try.Success _} + (in {try.#Success (case write + {try.#Success _} false - {#try.Failure write} + {try.#Failure write} (text\= input write))})) destroyed! (do ! [destroy (\ process destroy [])] - (in {#try.Success (case destroy - {#try.Success _} + (in {try.#Success (case destroy + {try.#Success _} false - {#try.Failure destroy} + {try.#Failure destroy} (text\= destruction destroy))})) await (\ process await [])] (in (and (text\= command read) - (text\= oops error) + (text\= oops failure) wrote! destroyed! (i.= exit await))))] |