diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-25 15:49:29 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-25 15:50:51 -0800 |
| commit | a1b559a3a269bbee1ae9a33061b08a868ea52f5c (patch) | |
| tree | 51f2368c6542efe47dd2a4007ba92e22650236b9 /lib/tools | |
| parent | 1713a0e38f12f8ed167575ac5a84a0eb8dd59a44 (diff) | |
Added metatables for bool, number, function, coroutine. Added
run-time check to make sure precompiled code used the same version of
Lua. Methods can now be used in (* compiles to *), etc.
Diffstat (limited to 'lib/tools')
| -rwxr-xr-x | lib/tools/test.nom | 21 |
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: |
