mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-02-12 07:40:16 +01:00
Switch test runner output filter sed to extended regex (-E
)
This commit is contained in:
parent
4a272c348c
commit
c370772ee0
@ -2,7 +2,7 @@
|
|||||||
-s
|
-s
|
||||||
:INPUT
|
:INPUT
|
||||||
:OUTPUT-FILTER
|
:OUTPUT-FILTER
|
||||||
1s/^.\+: /boxes: /
|
1s/^.+?: /boxes: /
|
||||||
1s/-- s$/-- 's'/
|
1s/-- s$/-- 's'/
|
||||||
:EXPECTED-ERROR 1
|
:EXPECTED-ERROR 1
|
||||||
boxes: option requires an argument -- 's'
|
boxes: option requires an argument -- 's'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
:INPUT
|
:INPUT
|
||||||
foo
|
foo
|
||||||
:OUTPUT-FILTER
|
:OUTPUT-FILTER
|
||||||
1s/^.\+: /boxes: /
|
1s/^.+?: /boxes: /
|
||||||
1s/-- s$/-- 's'/
|
1s/-- s$/-- 's'/
|
||||||
:EXPECTED-ERROR 1
|
:EXPECTED-ERROR 1
|
||||||
boxes: option requires an argument -- 's'
|
boxes: option requires an argument -- 's'
|
||||||
|
@ -84,7 +84,7 @@ export BOXES=../boxes-config
|
|||||||
|
|
||||||
cat $testInputFile | $boxesBinary $boxesArgs >$testOutputFile 2>&1
|
cat $testInputFile | $boxesBinary $boxesArgs >$testOutputFile 2>&1
|
||||||
declare -ir actualReturnCode=$?
|
declare -ir actualReturnCode=$?
|
||||||
cat $testOutputFile | tr -d '\r' | sed -f $testFilterFile | diff - $testExpectationFile
|
cat $testOutputFile | tr -d '\r' | sed -E -f $testFilterFile | diff - $testExpectationFile
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
>&2 echo "Error in test case: $testCaseFile (top: actual; bottom: expected)"
|
>&2 echo "Error in test case: $testCaseFile (top: actual; bottom: expected)"
|
||||||
exit 5
|
exit 5
|
||||||
|
Loading…
Reference in New Issue
Block a user