summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lib15
-rwxr-xr-xtests/tests/debpolicy-newreject2
-rwxr-xr-xtests/tests/trustingpolicy-replay2
3 files changed, 16 insertions, 3 deletions
diff --git a/tests/lib b/tests/lib
index 776e2a3..332bef2 100644
--- a/tests/lib
+++ b/tests/lib
@@ -44,12 +44,25 @@ END
t-expect-fail () {
local mpat="$1"; shift
+
+ local grepper=fgrep
+ case "$mpat" in
+ [A-Z]:*)
+ case "$mpat" in
+ E:*) grepper=egrep ;;
+ F:*) grepper=fgrep ;;
+ *) fail "bad mpat prefix in $mpat";;
+ esac
+ mpat=${mpat#[A-Z]:}
+ ;;
+ esac
+
set +o pipefail
LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output
local gotstatus=${PIPESTATUS[0]}
set -o pipefail
test $gotstatus != 0
- egrep "$mpat" $tmp/t.output ||false
+ $grepper -e "$mpat" $tmp/t.output ||false
}
t-reporefs () {
diff --git a/tests/tests/debpolicy-newreject b/tests/tests/debpolicy-newreject
index bda8694..82762bb 100755
--- a/tests/tests/debpolicy-newreject
+++ b/tests/tests/debpolicy-newreject
@@ -45,7 +45,7 @@ t-git-dir-check enoent
t-commit 'should require --deliberately...questionable'
t-dgit build
-t-expect-fail "tag debian/$vanished referred to this object.*all previously pushed versions were found to have been removed" \
+t-expect-fail E:"tag debian/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \
t-dgit push --new
t-git-dir-check enoent
diff --git a/tests/tests/trustingpolicy-replay b/tests/tests/trustingpolicy-replay
index 4fc3c17..79674fe 100755
--- a/tests/tests/trustingpolicy-replay
+++ b/tests/tests/trustingpolicy-replay
@@ -47,7 +47,7 @@ prepare-replay () {
t-commit "request with $delib that we will replay"
t-dgit build
- t-expect-fail "policy-hook.*No such file or directory" \
+ t-expect-fail E:'policy-hook.*No such file or directory' \
t-dgit push $delib
t-policy dgit-repos-policy-trusting