Improve testrunner.sh's handling of whitespace args #92

This commit is contained in:
Thomas Jensen 2021-08-30 16:37:11 +02:00
parent ab9f123981
commit 270d3ed7d7
No known key found for this signature in database
GPG Key ID: A4ACEE270D0FB7DB
4 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
:ARGS :ARGS
-c # -c "#"
:INPUT :INPUT
a a

View File

@ -1,5 +1,5 @@
:ARGS :ARGS
-c # -l -c "#" -l
:INPUT :INPUT
:OUTPUT-FILTER :OUTPUT-FILTER
:EXPECTED :EXPECTED

View File

@ -1,5 +1,5 @@
:ARGS :ARGS
-f 14x_tag_query.cfg -q (all) -f 14x_tag_query.cfg -q "(all)"
:INPUT :INPUT
:OUTPUT-FILTER :OUTPUT-FILTER
:EXPECTED :EXPECTED

View File

@ -94,9 +94,9 @@ fi
echo " Invoking: $(basename $boxesBinary) $boxesArgs" echo " Invoking: $(basename $boxesBinary) $boxesArgs"
if [ ! -z "$BOXES_TEST_XXD" ]; then if [ ! -z "$BOXES_TEST_XXD" ]; then
cat $testInputFile | $boxesBinary $boxesArgs | xxd >$testOutputFile 2>&1 cat $testInputFile | eval "$boxesBinary $boxesArgs" | xxd >$testOutputFile 2>&1
else else
cat $testInputFile | $boxesBinary $boxesArgs >$testOutputFile 2>&1 cat $testInputFile | eval "$boxesBinary $boxesArgs" >$testOutputFile 2>&1
fi fi
declare -ir actualReturnCode=$? declare -ir actualReturnCode=$?
cat $testOutputFile | tr -d '\r' | sed -E -f $testFilterFile | diff - $testExpectationFile cat $testOutputFile | tr -d '\r' | sed -E -f $testFilterFile | diff - $testExpectationFile