mirror of
https://github.com/ascii-boxes/boxes.git
synced 2024-12-12 09:51:10 +01:00
Improve test runner to handle windows line breaks in :ARGS spec
This commit is contained in:
parent
f60b9c5140
commit
eeb5e5d372
@ -68,7 +68,7 @@ declare -r testInputFile=${testCaseFile/%.txt/.input.tmp}
|
||||
declare -r testExpectationFile=${testCaseFile/%.txt/.expected.tmp}
|
||||
declare -r testFilterFile=${testCaseFile/%.txt/.sed.tmp}
|
||||
declare -r testOutputFile=${testCaseFile/%.txt/.out.tmp}
|
||||
declare -r boxesArgs=$(cat $testCaseFile | sed -n '/^:ARGS/,+1p' | grep -v ^:INPUT | sed '1d')
|
||||
declare -r boxesArgs=$(cat $testCaseFile | sed -n '/^:ARGS/,+1p' | grep -v ^:INPUT | sed '1d' | tr -d '\r')
|
||||
|
||||
cat $testCaseFile | sed -n '/^:INPUT/,/^:OUTPUT-FILTER/p;' | sed '1d;$d' | tr -d '\r' > $testInputFile
|
||||
cat $testCaseFile | sed -n '/^:OUTPUT-FILTER/,/^:EXPECTED\b.*$/p;' | sed '1d;$d' | tr -d '\r' > $testFilterFile
|
||||
|
Loading…
Reference in New Issue
Block a user