aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/test.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/command/test.lux')
-rw-r--r--stdlib/source/program/aedifex/command/test.lux22
1 files changed, 14 insertions, 8 deletions
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index 5c205b7b8..93c705be1 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -15,7 +15,8 @@
[world
[environment (#+ Environment)]
["." file]
- ["." shell (#+ Shell)]]]
+ ["." shell (#+ Shell)]
+ ["." console (#+ Console)]]]
["." // #_
["#." build]
["/#" // #_
@@ -25,12 +26,16 @@
[dependency
[resolution (#+ Resolution)]]]])
-(def: #export (do! environment fs shell resolution profile)
- (-> Environment (file.System Promise) (Shell Promise) Resolution (Command Any))
+(def: #export start "[TEST STARTED]")
+(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! environment fs shell resolution profile)
+ [[compiler program] (//build.do! console environment fs shell resolution profile)
working-directory (promise\wrap (//build.working-directory environment))
- #let [_ (log! "[TEST STARTED]")]
+ _ (console.write-line ..start console)
process (!.use (\ shell execute)
[environment
working-directory
@@ -39,7 +44,8 @@
(#//build.JS artifact) (///runtime.node program))
(list)])
exit (!.use (\ process await) [])
- #let [_ (log! (if (i.= shell.normal exit)
- "[TEST ENDED]"
- "[TEST FAILED]"))]]
+ _ (console.write-line (if (i.= shell.normal exit)
+ ..success
+ ..failure)
+ console)]
(wrap [])))