diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib | 7 | ||||
-rwxr-xr-x | tests/tests/push-newpackage | 5 |
2 files changed, 9 insertions, 3 deletions
@@ -46,6 +46,13 @@ fail () { exit 1 } +t-expect-fail () { + local mpat="$1"; shift + LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output + test ${PIPESTATUS[0]} != 0 + egrep "$mpat" $tmp/t.output ||false +} + t-untar () { local tarfile=$1.tar local edittree=$1.edit diff --git a/tests/tests/push-newpackage b/tests/tests/push-newpackage index 2bfa5d5..419ffd3 100755 --- a/tests/tests/push-newpackage +++ b/tests/tests/push-newpackage @@ -8,9 +8,8 @@ cd $p t-refs-same-start t-ref-head -LC_MESSAGES=C t-dgit push 2>&1 \ - | tee /dev/stderr \ - | grep 'package appears to be new in this suite' >/dev/null +t-expect-fail 'package appears to be new in this suite' \ +t-dgit push t-dgit build |