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/lux/world | |
parent | ef77466323f85a3d1b65b46a3deb93652ef22085 (diff) |
Migrated variants to the new syntax.
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/net/http/client.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/program.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/shell.lux | 34 |
5 files changed, 31 insertions, 31 deletions
diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux index 3f54d54a7..eaf882016 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 aee4f4922..5ad722723 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/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index 1f80ba26b..9a789fd70 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -59,11 +59,11 @@ data (|> value (\ nat.decimal encoded) (\ utf8.codec encoded))] - (#try.Success [//status.ok + {#try.Success [//status.ok [#//.headers headers #//.body (function (_ ?wanted_bytes) - (io.io (#try.Success [(binary.size data) - data])))]]))))))]] + (io.io {#try.Success [(binary.size data) + data]}))]]})))))]] (`` ($_ _.and (~~ (template [<definition> <expected>] [(_.cover [<definition>] diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux index eafafecaa..c498a939b 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 8d98b5f1f..daa0a5e11 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -44,22 +44,22 @@ (def: (on_error 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)) @@ -70,15 +70,15 @@ (: (/.Process IO)) (implementation (def: (read _) - (io.io (#try.Success command))) + (io.io {#try.Success command})) (def: (error _) - (io.io (#try.Success oops))) + (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 @@ -103,20 +103,20 @@ error (\ process error []) wrote! (do ! [write (\ process write input)] - (in (#try.Success (case write - (#try.Success _) + (in {#try.Success (case write + {#try.Success _} false - (#try.Failure write) - (text\= input 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) - (text\= destruction destroy))))) + {#try.Failure destroy} + (text\= destruction destroy))})) await (\ process await [])] (in (and (text\= command read) (text\= oops error) |