@matheusbsbs / matheus-bagliano / commits / e8a5f07d51
Fork 0

t7508: don't use `test_must_fail test_cmp`

The test_must_fail function should only be used for git commands since we 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>

Denton Liu committed Apr 20, 2020 at 04:54 UTC e8a5f07d51c5a3081ec65a011681b643ae97b000
1 file changed +1 -1
t/t7508-status.sh
+1 -1
@@ -1471,7 +1471,7 @@ test_expect_success '"status.branch=true" same as "-b"' '
1471 test_expect_success '"status.branch=true" different from "--no-branch"' '
1472 git status -s --no-branch >expected_nobranch &&
1473 git -c status.branch=true status -s >actual &&
1474 - test_must_fail test_cmp expected_nobranch actual
1474 + ! test_cmp expected_nobranch actual
1475 '
1476
1477 test_expect_success '"status.branch=true" weaker than "--no-branch"' '