]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5512: don't use `test_must_fail test_cmp`
authorDenton Liu <liu.denton@gmail.com>
Wed, 25 Mar 2020 05:54:48 +0000 (01:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Mar 2020 06:23:44 +0000 (23:23 -0700)
The test_must_fail function should only be used for git commands since
we should assume that external commands work sanely. Since test_cmp() just
wraps an external command, replace `test_must_fail test_cmp` with
`! test_cmp`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5512-ls-remote.sh

index 04b35402c7aab16319713f8aed205e6c9d809893..08b98f12b8785681e6fa39596a184a8b49d9f46f 100755 (executable)
@@ -92,7 +92,7 @@ test_expect_success 'use "origin" when no remote specified' '
 
 test_expect_success 'suppress "From <url>" with -q' '
        git ls-remote -q 2>actual_err &&
-       test_must_fail test_cmp exp_err actual_err
+       ! test_cmp exp_err actual_err
 '
 
 test_expect_success 'use branch.<name>.remote if possible' '