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 коммит произвёл Junio C Hamano
Родитель e5d7e9f516
Коммит fbd6ef273e
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

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