mirror of
https://github.com/ascii-boxes/boxes.git
synced 2024-12-12 18:01:14 +01:00
testrunner.sh uses boxes.exe if present, else standard boxes to better support win32
This commit is contained in:
parent
4ea419b6be
commit
c7c7329659
@ -65,10 +65,15 @@ declare -r boxesArgs=$(cat $testCaseFile | sed -n '/^:ARGS/,+1p' | grep -v ^:INP
|
||||
cat $testCaseFile | sed -n '/^:INPUT/,/^:EXPECTED\b.*$/p;' | sed '1d;$d' | tr -d '\r' > $testInputFile
|
||||
cat $testCaseFile | sed -n '/^:EXPECTED/,/^:EOF\b.*$/p;' | sed '1d;$d' | tr -d '\r' > $testExpectationFile
|
||||
|
||||
echo " Invoking: boxes $boxesArgs"
|
||||
declare boxesBinary=../src/boxes.exe
|
||||
if [ ! -x $boxesBinary ]; then
|
||||
boxesBinary=../src/boxes
|
||||
fi
|
||||
|
||||
echo " Invoking: $(basename $boxesBinary) $boxesArgs"
|
||||
export BOXES=../boxes-config
|
||||
|
||||
cat $testInputFile | ../src/boxes $boxesArgs >$testOutputFile 2>&1
|
||||
cat $testInputFile | $boxesBinary $boxesArgs >$testOutputFile 2>&1
|
||||
declare -ir actualReturnCode=$?
|
||||
cat $testOutputFile | tr -d '\r' | diff - $testExpectationFile
|
||||
if [ $? -ne 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user