aboutsummaryrefslogtreecommitdiff
path: root/lib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools')
-rwxr-xr-xlib/tools/test.nom21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/tools/test.nom b/lib/tools/test.nom
index 761ec55..945ce8c 100755
--- a/lib/tools/test.nom
+++ b/lib/tools/test.nom
@@ -41,16 +41,19 @@ command line program with $args:
if $args.v:
say " \(yellow ($.test, with "\n" -> "\n "))"
- try:
+ if $args.e:
$(test environment), run $.test
- ..if it fails with $msg:
- $src = ($Source, from string $.source)
- $l1 = ($file, line number at $src.start)
- $l2 = ($file, line number at $src.stop)
- $failures, add ("
- \(yellow "\($src.filename):\($l1)-\$l2:")
- \(bright (red ($msg, indented)))
- ")
+ ..else:
+ try:
+ $(test environment), run $.test
+ ..if it fails with $msg:
+ $src = ($Source, from string $.source)
+ $l1 = ($file, line number at $src.start)
+ $l2 = ($file, line number at $src.stop)
+ $failures, add ("
+ \(yellow "\($src.filename):\($l1)-\$l2:")
+ \(bright (red ($msg, indented)))
+ ")
if ($failures is empty):
if $args.v: