aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/lux/world/shell.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/specification/lux/world/shell.lux')
-rw-r--r--stdlib/source/specification/lux/world/shell.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/specification/lux/world/shell.lux b/stdlib/source/specification/lux/world/shell.lux
index c4fc51b99..55197a307 100644
--- a/stdlib/source/specification/lux/world/shell.lux
+++ b/stdlib/source/specification/lux/world/shell.lux
@@ -7,7 +7,7 @@
[control
["." try ("#\." functor)]
[concurrency
- ["." promise (#+ Promise) ("#\." monad)]]
+ ["." async (#+ Async) ("#\." monad)]]
[parser
["." environment (#+ Environment)]]]
[data
@@ -34,22 +34,22 @@
)
(def: (can_wait! process)
- (-> (/.Process Promise) _.Assertion)
+ (-> (/.Process Async) _.Assertion)
(|> (\ process await [])
- (promise\map (|>> (try\map (i.= /.normal))
- (try.default false)
- (_.cover' [/.Exit /.normal])))
- promise\join))
+ (async\map (|>> (try\map (i.= /.normal))
+ (try.default false)
+ (_.cover' [/.Exit /.normal])))
+ async\join))
(def: (can_read! expected process)
- (-> Text (/.Process Promise) (Promise Bit))
+ (-> Text (/.Process Async) (Async Bit))
(|> (\ process read [])
- (promise\map (|>> (try\map (text\= expected))
- (try.default false)))))
+ (async\map (|>> (try\map (text\= expected))
+ (try.default false)))))
(def: (can_destroy! process)
- (-> (/.Process Promise) (Promise Bit))
- (do promise.monad
+ (-> (/.Process Async) (Async Bit))
+ (do async.monad
[?destroy (\ process destroy [])
?await (\ process await [])]
(wrap (and (case ?destroy
@@ -67,12 +67,12 @@
(with_expansions [<shell_coverage> (as_is [/.Command /.Argument])]
(def: #export (spec shell)
- (-> (/.Shell Promise) Test)
+ (-> (/.Shell Async) Test)
(<| (_.for [/.Shell /.Process])
(do {! random.monad}
[message (random.ascii/alpha 10)
seconds (\ ! map (|>> (n.% 5) (n.+ 5)) random.nat)]
- (wrap (do {! promise.monad}
+ (wrap (do {! async.monad}
[?echo (\ shell execute (..echo! message))
?sleep (\ shell execute (..sleep! seconds))]
(case [?echo ?sleep]