diff options
Diffstat (limited to 'tools/test.nom')
| -rwxr-xr-x | tools/test.nom | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/test.nom b/tools/test.nom index 52e548f..1fd5ee3 100755 --- a/tools/test.nom +++ b/tools/test.nom @@ -12,9 +12,15 @@ use "lib/consolecolor.nom" for %filename in (command line args).extra_args: use %filename %tests = {: for %s = %t in (tests): add (=lua "Source:from_string(\%s)") = %t} for %filename in (command line args).extra_args: + %file = (read file %filename) + %version = (%file::matching "#![^\n]* nomsu %-V[ ]*([^\n]*)") %file_tests = [] for %src = %test in %tests: if (%src.filename == %filename): + if %version: + %test = "\ + ..#!/usr/bin/env nomsu -V\(%version) + \%test" %file_tests::add {test: %test, source: %src} unless (%file_tests is empty): |
