diff options
author | Eduardo Julian | 2021-07-02 03:11:36 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-02 03:11:36 -0400 |
commit | 5cf4efa861075f8276f43a2516f5beacaf610b44 (patch) | |
tree | e21cf528d960c29d22cbc7e41180fa09e62f16d6 /stdlib/source/test/lux/world/console.lux | |
parent | 744ee69630de59ca3ba660b0aab6361cd17ce1b4 (diff) |
No longer employing the capabilities model on the lux/world/* modules.
Capabilities should be opt-in, but using them in the standard library makes them mandatory.
Diffstat (limited to 'stdlib/source/test/lux/world/console.lux')
-rw-r--r-- | stdlib/source/test/lux/world/console.lux | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux index 56e3902f0..b196199fc 100644 --- a/stdlib/source/test/lux/world/console.lux +++ b/stdlib/source/test/lux/world/console.lux @@ -6,9 +6,7 @@ [control ["." io] ["." try (#+ Try)] - ["." exception (#+ exception:)] - [security - ["!" capability]]] + ["." exception (#+ exception:)]] [data ["." text ("#\." equivalence) ["%" format (#+ format)]]] @@ -21,8 +19,8 @@ (exception: dead) -(def: simulation - (/.Simulation [Bit Text]) +(def: mock + (/.Mock [Bit Text]) (implementation (def: (on_read [dead? content]) (do try.monad @@ -53,16 +51,16 @@ Test (<| (_.covering /._) ($_ _.and - (_.for [/.async /.mock /.Simulation] - ($/.spec (io.io (/.async (/.mock ..simulation [false ""]))))) + (_.for [/.async /.mock /.Mock] + ($/.spec (io.io (/.async (/.mock ..mock [false ""]))))) (do random.monad [expected (random.ascii/alpha 10) - #let [console (/.mock ..simulation [false ""])]] + #let [console (/.mock ..mock [false ""])]] (_.cover [/.write_line] (io.run (do io.monad [?_ (/.write_line expected console) - ?actual (!.use (\ console read_line) [])] + ?actual (\ console read_line [])] (wrap (<| (try.default false) (do try.monad [_ ?_ |