]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5405: use test_must_fail() instead of checking exit code manually
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 2 Jul 2018 00:23:46 +0000 (20:23 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jul 2018 19:38:04 +0000 (12:38 -0700)
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>
t/t5405-send-pack-rewind.sh

index 4bda18a662da5a0c36ee007c37d9ded6be3b1832..235fb7686ae0dec21e81b06dd0b220f0705a6b2e 100755 (executable)
@@ -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
        )
 
 '