diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-10 18:25:12 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-10 18:25:12 +0100 |
commit | 5d8e32854c1d89e337bc606d423634a667f9b0ff (patch) | |
tree | 2fd8daceed380a8a42717d605cd5b989e1208d9f /tests/tests/drs-push-rejects | |
parent | 609f108165197b1d7a55a4908a321bad40a86442 (diff) |
Test suite: Move most of mustfail into t-expect-fail
Diffstat (limited to 'tests/tests/drs-push-rejects')
-rwxr-xr-x | tests/tests/drs-push-rejects | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects index 640aeae..13567c3 100755 --- a/tests/tests/drs-push-rejects +++ b/tests/tests/drs-push-rejects @@ -11,20 +11,12 @@ t-worktree drs cd $p mustfail () { - local wantmsg="$1"; shift + local mpat="$1"; shift t-reporefs pre-push - set +o pipefail + + t-expect-fail "$mpat" \ git push origin "$@" 2>&1 |tee $tmp/mustfail.txt - ps="${PIPESTATUS[*]}" - set -o pipefail - case $ps in - "0 0") fail "push unexpectedly succeeded (instead of: $wantmsg)" ;; - *" 0") ;; - *) fail "tee failed" ;; - esac - if ! fgrep "$wantmsg" $tmp/mustfail.txt >/dev/null; then - fail "error message not found" - fi + t-reporefs post-push diff $tmp/show-refs.{pre,post}-push } |