From a1b559a3a269bbee1ae9a33061b08a868ea52f5c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 25 Jan 2019 15:49:29 -0800 Subject: 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. --- lib/tools/test.nom | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'lib/tools/test.nom') 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: -- cgit v1.2.3