diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-03-14 08:47:58 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-03-14 15:31:34 +0100 |
commit | 46188077ef727c21513008f4e0c42e8cb211e90e (patch) | |
tree | 47933baeb43ff6ff3a95810c25fc189a6062e7be /tests/custom | |
parent | 23929951ad4b0ed2bcea793f6bf72d9e4236d3c7 (diff) |
main: rework CLI frontend
- Change command line flags to be align better with those of other
interpreters and with the gcc compiler, e.g. `-D` and `-U` to
define and undefine globals, `-e` to execute script expression etc.
- Pass only excess CLI arguments as `ARGV` to scripts, e.g.
`ucode -e 'print("Hello world")' -- -x -y` would pass only
`[ "-x", "-y" ]` as ARGV contents
- Default to raw mode and introduce flag to enable template mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom')
-rwxr-xr-x | tests/custom/run_tests.sh | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/custom/run_tests.sh b/tests/custom/run_tests.sh index 2f13c3b..c2839df 100755 --- a/tests/custom/run_tests.sh +++ b/tests/custom/run_tests.sh @@ -93,10 +93,7 @@ run_testcase() { IFS=$' \t\n' - $ucode_bin $args -e '{ - "REQUIRE_SEARCH_PATH": [ "'"$ucode_lib"'/*.so" ], - "TESTFILES_PATH": "'"$dir"'/files" - }' -i - <"$in" >"$dir/res.out" 2>"$dir/res.err" + $ucode_bin -T -L "$ucode_lib/*.so" -D TESTFILES_PATH="$dir/files" $args - <"$in" >"$dir/res.out" 2>"$dir/res.err" ) printf "%d\n" $? > "$dir/res.code" |