summaryrefslogtreecommitdiff
path: root/t/t5405-send-pack-rewind.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2018-07-01 20:23:46 -0400
committerJunio C Hamano <gitster@pobox.com>2018-07-03 12:38:04 -0700
commitfbd6ef273e1d1d88a4056b986bd8a331cc61ea39 (patch)
tree15bce853dc8e3355e5d4d19fb2776db6efa312a4 /t/t5405-send-pack-rewind.sh
parente5d7e9f5164e90386622a80a9dfc4b1675bcc92b (diff)
downloadgit-fbd6ef273e1d1d88a4056b986bd8a331cc61ea39.tar.gz
t5405: use test_must_fail() instead of checking exit code manually
This test expects "git push" to fail, thus it manually inverts that local expected failure into a successful exit code for the test overall. In doing so, it intentionally breaks the &&-chain. Modernize by replacing manual exit code management with test_must_fail() and a normal &&-chain. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5405-send-pack-rewind.sh')
-rwxr-xr-xt/t5405-send-pack-rewind.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh
index 4bda18a662..235fb7686a 100755
--- a/t/t5405-send-pack-rewind.sh
+++ b/t/t5405-send-pack-rewind.sh
@@ -25,8 +25,7 @@ test_expect_success 'non forced push should die not segfault' '
(
cd another &&
- git push .. master:master
- test $? = 1
+ test_must_fail git push .. master:master
)
'