aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/test.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-10 07:28:48 -0400
committerEduardo Julian2020-12-10 07:28:48 -0400
commitd747aada2d6df6538d0a88d70169f3757aef50af (patch)
treec26b4350cfa8a256814bb9805525325842bd5ab3 /stdlib/source/program/aedifex/command/test.lux
parent14287585025b2d8fff1991691def9e643b039ac8 (diff)
Updated Lux license to v0.1.1.
Diffstat (limited to 'stdlib/source/program/aedifex/command/test.lux')
-rw-r--r--stdlib/source/program/aedifex/command/test.lux45
1 files changed, 23 insertions, 22 deletions
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index 3b5afaabf..089417b94 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -6,15 +6,14 @@
[concurrency
["." promise (#+ Promise) ("#\." monad)]]
[security
- ["!" capability]]
- [parser
- [environment (#+ Environment)]]]
+ ["!" capability]]]
[data
[text
["%" format (#+ format)]]
[number
["i" int]]]
[world
+ [program (#+ Program)]
["." file]
["." shell (#+ Shell)]
["." console (#+ Console)]]]
@@ -31,22 +30,24 @@
(def: #export success "[TEST ENDED]")
(def: #export failure "[TEST FAILED]")
-(def: #export (do! console environment fs shell resolution profile)
- (-> (Console Promise) Environment (file.System Promise) (Shell Promise) Resolution (Command Any))
- (do ///action.monad
- [[compiler program] (//build.do! console environment fs shell resolution profile)
- working-directory (promise\wrap (//build.working-directory environment))
- _ (console.write-line ..start console)
- process (!.use (\ shell execute)
- [environment
- working-directory
- (case compiler
- (#//build.JVM artifact) (///runtime.java program)
- (#//build.JS artifact) (///runtime.node program))
- (list)])
- exit (!.use (\ process await) [])
- _ (console.write-line (if (i.= shell.normal exit)
- ..success
- ..failure)
- console)]
- (wrap [])))
+(def: #export (do! console program fs shell resolution profile)
+ (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any))
+ (do promise.monad
+ [environment (\ program environment [])
+ working-directory (\ program directory [])]
+ (do ///action.monad
+ [[compiler program] (//build.do! console program fs shell resolution profile)
+ _ (console.write-line ..start console)
+ process (!.use (\ shell execute)
+ [environment
+ working-directory
+ (case compiler
+ (#//build.JVM artifact) (///runtime.java program)
+ (#//build.JS artifact) (///runtime.node program))
+ (list)])
+ exit (!.use (\ process await) [])
+ _ (console.write-line (if (i.= shell.normal exit)
+ ..success
+ ..failure)
+ console)]
+ (wrap []))))