diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-14 15:42:48 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-14 15:43:24 -0800 |
| commit | c1c32688a4afc43f6addb99b8b5fa878944a70e3 (patch) | |
| tree | c886f21b5b08a9053aa74fcba4b241dae5ede76d /tools/test.nom | |
| parent | 2309b696fc34b24f05f6658b94f9105ca8ee76e4 (diff) | |
Overhaul in progress, mostly working. Moved all the nomsu packages into
lib/, including core/*. Changes to how nomsu environments and importing
work.
Diffstat (limited to 'tools/test.nom')
| -rwxr-xr-x | tools/test.nom | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tools/test.nom b/tools/test.nom deleted file mode 100755 index 44d783b..0000000 --- a/tools/test.nom +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env nomsu -V6.14 -# - Tool to run all tests in a file (i.e. the code block inside a call to 'test $'). Usage: - nomsu tools/test.nom file1 file2 directory1 ... - -use "lib/os" -use "lib/consolecolor" - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -for $filename in $(COMMAND LINE ARGS).extras: - $(test environment) = (new environment) - $(test environment), use $filename - $file = (read file $filename) - $version = - $file, matching (" - #![^ - ]* nomsu %-V[ ]*([^ - ]*) - ") - $file_tests = [] - for $src = $test in $(test environment).TESTS: - if $version: - $test = (" - #!/usr/bin/env nomsu -V\$version - \$test - ") - $file_tests, add {.test = $test, .source = $src} - - unless ($file_tests is empty): - sort $file_tests by $ -> $.source - lua> "io.write('[ .. ] ', \$filename); io.flush()" - - if (command line args).v: say "" - - for $ in $file_tests: - if (command line args).v: - say " \(yellow ($.test, with "\n" -> "\n "))" - $(test environment), run $.test - - if (command line args).v: - say (green "PASS") - ..else: - say "\r[\(green "PASS")" |
