From c370772ee0ec1c090ac1a40beab2d9991851498c Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Thu, 11 Feb 2021 10:47:16 +0100 Subject: [PATCH] Switch test runner output filter sed to extended regex (`-E`) --- test/004_missing_option_argument.txt | 2 +- test/065_size_missing_argument.txt | 2 +- test/testrunner.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/004_missing_option_argument.txt b/test/004_missing_option_argument.txt index d0fa894..8222bbb 100644 --- a/test/004_missing_option_argument.txt +++ b/test/004_missing_option_argument.txt @@ -2,7 +2,7 @@ -s :INPUT :OUTPUT-FILTER -1s/^.\+: /boxes: / +1s/^.+?: /boxes: / 1s/-- s$/-- 's'/ :EXPECTED-ERROR 1 boxes: option requires an argument -- 's' diff --git a/test/065_size_missing_argument.txt b/test/065_size_missing_argument.txt index 2c432e7..6dad5ae 100644 --- a/test/065_size_missing_argument.txt +++ b/test/065_size_missing_argument.txt @@ -3,7 +3,7 @@ :INPUT foo :OUTPUT-FILTER -1s/^.\+: /boxes: / +1s/^.+?: /boxes: / 1s/-- s$/-- 's'/ :EXPECTED-ERROR 1 boxes: option requires an argument -- 's' diff --git a/test/testrunner.sh b/test/testrunner.sh index 67dbed6..df510f4 100755 --- a/test/testrunner.sh +++ b/test/testrunner.sh @@ -84,7 +84,7 @@ export BOXES=../boxes-config cat $testInputFile | $boxesBinary $boxesArgs >$testOutputFile 2>&1 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 >&2 echo "Error in test case: $testCaseFile (top: actual; bottom: expected)" exit 5