]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5612: don't use `test_must_fail test_cmp`
authorDenton Liu <liu.denton@gmail.com>
Thu, 26 Mar 2020 08:27:53 +0000 (04:27 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 17:56:40 +0000 (10:56 -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/t5612-clone-refspec.sh

index e36ac01661d1b5cd26b0ae4fe615b9ccf44e02c8..28373e715a41d36f20b0e09e6d94379702375f8a 100755 (executable)
@@ -87,7 +87,7 @@ test_expect_success 'by default no tags will be kept updated' '
                git for-each-ref refs/tags >../actual
        ) &&
        git for-each-ref refs/tags >expect &&
-       test_must_fail test_cmp expect actual &&
+       ! test_cmp expect actual &&
        test_line_count = 2 actual
 '