diff options
author | Eduardo Julian | 2021-09-12 15:39:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-12 15:39:55 -0400 |
commit | 2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch) | |
tree | 14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /stdlib/source/test/lux/world | |
parent | dda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff) |
Re-named \ => # && \\ => ##
Diffstat (limited to 'stdlib/source/test/lux/world')
-rw-r--r-- | stdlib/source/test/lux/world/console.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/file/watch.lux | 52 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/input/keyboard.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/net/http/client.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/output/video/resolution.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/program.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/shell.lux | 22 |
7 files changed, 54 insertions, 54 deletions
diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux index f044be377..da25ac18a 100644 --- a/stdlib/source/test/lux/world/console.lux +++ b/stdlib/source/test/lux/world/console.lux @@ -9,7 +9,7 @@ ["[0]" try {"+" [Try]}] ["[0]" exception {"+" [exception:]}]] [data - ["[0]" text ("[1]\[0]" equivalence) + ["[0]" text ("[1]#[0]" equivalence) ["%" format {"+" [format]}]]] [math ["[0]" random]]]] @@ -61,10 +61,10 @@ (io.run! (do io.monad [?_ (/.write_line expected console) - ?actual (\ console read_line [])] + ?actual (# console read_line [])] (in (<| (try.else false) (do try.monad [_ ?_ actual ?actual] - (in (text\= expected actual))))))))) + (in (text#= expected actual))))))))) ))) diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 3e7b03015..5f4ae714d 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -11,13 +11,13 @@ [concurrency ["[0]" async {"+" [Async]}]]] [data - ["[0]" binary {"+" [Binary]} ("[1]\[0]" equivalence)] - ["[0]" text ("[1]\[0]" equivalence) + ["[0]" binary {"+" [Binary]} ("[1]#[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence) ["%" format {"+" [format]}]] [collection ["[0]" list]]] [math - ["[0]" random {"+" [Random]} ("[1]\[0]" monad)]]]] + ["[0]" random {"+" [Random]} ("[1]#[0]" monad)]]]] [\\library ["[0]" / ["/[1]" //]]] @@ -28,12 +28,12 @@ (def: concern (Random [/.Concern (Predicate /.Concern)]) ($_ random.either - (random\in [/.creation /.creation?]) - (random\in [/.modification /.modification?]) - (random\in [/.deletion /.deletion?]) + (random#in [/.creation /.creation?]) + (random#in [/.modification /.modification?]) + (random#in [/.deletion /.deletion?]) )) -(def: concern\\test +(def: concern##test Test (<| (_.for [/.Concern]) ($_ _.and @@ -72,8 +72,8 @@ .let [[fs watcher] (/.mock "/")]] ($_ _.and (in (do async.monad - [?concern (\ watcher concern directory) - ?stop (\ watcher stop directory)] + [?concern (# watcher concern directory) + ?stop (# watcher stop directory)] (_.cover' [/.not_being_watched] (and (case ?concern {try.#Failure error} @@ -92,21 +92,21 @@ (def: (no_events_prior_to_creation! fs watcher directory) (-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit))) (do [! (try.with async.monad)] - [_ (\ fs make_directory directory) - _ (\ watcher start /.all directory)] - (|> (\ watcher poll []) - (\ ! each list.empty?)))) + [_ (# fs make_directory directory) + _ (# watcher start /.all directory)] + (|> (# watcher poll []) + (# ! each list.empty?)))) (def: (after_creation! fs watcher expected_path) (-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit))) (do (try.with async.monad) [_ (: (Async (Try Any)) (//.make_file async.monad fs (binary.empty 0) expected_path)) - poll/pre (\ watcher poll []) - poll/post (\ watcher poll [])] + poll/pre (# watcher poll []) + poll/post (# watcher poll [])] (in (and (case poll/pre (^ (list [concern actual_path])) - (and (text\= expected_path actual_path) + (and (text#= expected_path actual_path) (and (/.creation? concern) (not (/.modification? concern)) (not (/.deletion? concern)))) @@ -119,12 +119,12 @@ (-> (//.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."}) - _ (\ fs write data expected_path) - poll/2 (\ watcher poll []) - poll/2' (\ watcher poll [])] + _ (# fs write data expected_path) + poll/2 (# watcher poll []) + poll/2' (# watcher poll [])] (in (and (case poll/2 (^ (list [concern actual_path])) - (and (text\= expected_path actual_path) + (and (text#= expected_path actual_path) (and (not (/.creation? concern)) (/.modification? concern) (not (/.deletion? concern)))) @@ -136,9 +136,9 @@ (def: (after_deletion! fs watcher expected_path) (-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit))) (do (try.with async.monad) - [_ (\ fs delete expected_path) - poll/3 (\ watcher poll []) - poll/3' (\ watcher poll [])] + [_ (# fs delete expected_path) + poll/3 (# watcher poll []) + poll/3' (# watcher poll [])] (in (and (case poll/3 (^ (list [concern actual_path])) (and (not (/.creation? concern)) @@ -154,14 +154,14 @@ (<| (_.covering /._) (_.for [/.Watcher]) ($_ _.and - ..concern\\test + ..concern##test ..exception (do [! random.monad] [directory (random.ascii/alpha 5) .let [/ "/" [fs watcher] (/.mock /)] - expected_path (\ ! each (|>> (format directory /)) + expected_path (# ! each (|>> (format directory /)) (random.ascii/alpha 5)) data ($binary.random 10)] (in (do [! async.monad] @@ -188,7 +188,7 @@ .let [/ "/" [fs watcher] (/.mock /)]] (in (do async.monad - [started? ( \ watcher start /.all directory)] + [started? (# watcher start /.all directory)] (_.cover' [/.cannot_poll_a_non_existent_directory] (case started? {try.#Success _} diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux index 192c406c1..dcd14099c 100644 --- a/stdlib/source/test/lux/world/input/keyboard.lux +++ b/stdlib/source/test/lux/world/input/keyboard.lux @@ -7,7 +7,7 @@ [control ["[0]" maybe]] [data - ["[0]" bit ("[1]\[0]" equivalence)] + ["[0]" bit ("[1]#[0]" equivalence)] [collection ["[0]" list] ["[0]" set {"+" [Set]}]]] @@ -140,7 +140,7 @@ (Random /.Key) (let [count (list.size ..listing)] (do [! random.monad] - [choice (\ ! each (n.% count) random.nat)] + [choice (# ! each (n.% count) random.nat)] (in (maybe.trusted (list.item choice ..listing)))))) (def: .public test @@ -160,7 +160,7 @@ [key ..random .let [sample (<function> key)]] (_.cover [<function>] - (and (bit\= <pressed?> (value@ /.#pressed? sample)) + (and (bit#= <pressed?> (value@ /.#pressed? sample)) (n.= key (value@ /.#input sample)))))] [#0 /.release] diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index 5160aae60..6dee42643 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -41,7 +41,7 @@ on_connect random.nat on_options random.nat on_trace random.nat - num_headers (\ ! each (nat.% 10) random.nat) + num_headers (# ! each (nat.% 10) random.nat) headers (random.dictionary text.hash num_headers (random.ascii/lower 3) (random.ascii/lower 3)) .let [mock (: (/.Client IO) (implementation @@ -57,8 +57,8 @@ {//.#Options} on_options {//.#Trace} on_trace) data (|> value - (\ nat.decimal encoded) - (\ utf8.codec encoded))] + (# nat.decimal encoded) + (# utf8.codec encoded))] {try.#Success [//status.ok [//.#headers headers //.#body (function (_ ?wanted_bytes) @@ -71,8 +71,8 @@ (do> try.monad [io.run!] [product.right (value@ //.#body) (function.on {.#None}) io.run!] - [product.right (\ utf8.codec decoded)] - [(\ nat.decimal decoded)] + [product.right (# utf8.codec decoded)] + [(# nat.decimal decoded)] [(nat.= <expected>) in]) (try.else false)))] diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux index 5c4990479..efd6e44dc 100644 --- a/stdlib/source/test/lux/world/output/video/resolution.lux +++ b/stdlib/source/test/lux/world/output/video/resolution.lux @@ -47,7 +47,7 @@ (Random /.Resolution) (let [count (list.size ..listing)] (do [! random.monad] - [choice (\ ! each (n.% count) random.nat)] + [choice (# ! each (n.% count) random.nat)] (in (maybe.trusted (list.item choice ..listing)))))) (def: .public test diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux index e5909bcba..f65951af0 100644 --- a/stdlib/source/test/lux/world/program.lux +++ b/stdlib/source/test/lux/world/program.lux @@ -7,13 +7,13 @@ [control [pipe {"+" [case>]}] ["[0]" io] - ["[0]" maybe ("[1]\[0]" functor)] + ["[0]" maybe ("[1]#[0]" functor)] ["[0]" try] ["[0]" exception] [parser [environment {"+" [Environment]}]]] [data - ["[0]" text ("[1]\[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence)] [collection ["[0]" dictionary] ["[0]" list]]] @@ -42,7 +42,7 @@ Test (<| (_.covering /._) (do [! random.monad] - [env_size (\ ! each (|>> (n.% 10) ++) random.nat) + [env_size (# ! each (|>> (n.% 10) ++) random.nat) environment (..environment env_size) home ..path directory ..path @@ -63,12 +63,12 @@ (list.every? (function (_ [key value]) (|> environment (dictionary.value key) - (maybe\each (text\= value)) + (maybe#each (text#= value)) (maybe.else false))))))))))) (_.cover [/.unknown_environment_variable] (let [program (/.mock environment home directory)] (|> unknown - (\ program variable) + (# program variable) io.run! (case> {try.#Success _} false diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux index c79a2fa14..6525997bc 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -13,7 +13,7 @@ [parser ["[0]" environment {"+" [Environment]}]]] [data - ["[0]" text ("[1]\[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence)] [collection ["[0]" list]]] [math @@ -98,28 +98,28 @@ .let [shell (/.async (..io_shell command oops input destruction exit))]] (in (do [! async.monad] [verdict (do (try.with !) - [process (\ shell execute [environment.empty "~" command (list)]) - read (\ process read []) - failure (\ process fail []) + [process (# shell execute [environment.empty "~" command (list)]) + read (# process read []) + failure (# process fail []) wrote! (do ! - [write (\ process write input)] + [write (# process write input)] (in {try.#Success (case write {try.#Success _} false {try.#Failure write} - (text\= input write))})) + (text#= input write))})) destroyed! (do ! - [destroy (\ process destroy [])] + [destroy (# process destroy [])] (in {try.#Success (case destroy {try.#Success _} false {try.#Failure destroy} - (text\= destruction destroy))})) - await (\ process await [])] - (in (and (text\= command read) - (text\= oops failure) + (text#= destruction destroy))})) + await (# process await [])] + (in (and (text#= command read) + (text#= oops failure) wrote! destroyed! (i.= exit await))))] |