From: Ian Jackson Date: Sun, 31 May 2015 16:37:33 +0000 (+0100) Subject: Test suite: set -o pipefail, in lib X-Git-Tag: debian/0.30~103 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3f112ef280d8d10152089fcae772f5edd707817c;p=dgit.git Test suite: set -o pipefail, in lib --- diff --git a/tests/lib b/tests/lib index a0a84dda..cf8b7256 100644 --- a/tests/lib +++ b/tests/lib @@ -2,6 +2,7 @@ exec 2>&1 set -x +set -o pipefail . tests/lib-core @@ -43,8 +44,11 @@ END t-expect-fail () { local mpat="$1"; shift + set +o pipefail LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output - test ${PIPESTATUS[0]} != 0 + local gotstatus=${PIPESTATUS[0]} + set -o pipefail + test $gotstatus != 0 egrep "$mpat" $tmp/t.output ||false }