diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-21 13:56:25 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-21 13:56:25 -0800 |
| commit | fa967247daae4fec8c42efe73fd16c615b4fb7d5 (patch) | |
| tree | 441712eef0663fb28c3ee0063ef184e149a4c1e2 /tools | |
| parent | 2bbc035f5dcc3ecd62724b9d1de0e7e3ea902379 (diff) | |
Fixed tests to work better with different syntax versions.
Diffstat (limited to 'tools')
| -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): |
