1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 22:46:09 +02:00

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>
This commit is contained in:
Eric Sunshine 2018-07-01 20:23:46 -04:00 committed by Junio C Hamano
parent e5d7e9f516
commit fbd6ef273e

View File

@ -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
)
'