@matheusbsbs / matheus-bagliano / commits / 62d58cda69
Fork 0

t1409: use test_path_is_missing()

The test_must_fail() function should only be used for git commands since we should assume that external commands work sanely. Replace `test_must_fail test -f` with `test_path_is_missing` since we expect these paths to not exist. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Dec 20, 2019 at 10:15 UTC 62d58cda69621eb2f70517c87f1baeeb7b2f398c
1 file changed +5 -5
t/t1409-avoid-packing-refs.sh
+5 -5
@@ -27,15 +27,15 @@ test_expect_success 'setup' '
27 '
28
29 test_expect_success 'do not create packed-refs file gratuitously' '
30 - test_must_fail test -f .git/packed-refs &&
30 + test_path_is_missing .git/packed-refs &&
31 git update-ref refs/heads/foo $A &&
32 - test_must_fail test -f .git/packed-refs &&
32 + test_path_is_missing .git/packed-refs &&
33 git update-ref refs/heads/foo $B &&
34 - test_must_fail test -f .git/packed-refs &&
34 + test_path_is_missing .git/packed-refs &&
35 git update-ref refs/heads/foo $C $B &&
36 - test_must_fail test -f .git/packed-refs &&
36 + test_path_is_missing .git/packed-refs &&
37 git update-ref -d refs/heads/foo &&
38 - test_must_fail test -f .git/packed-refs
38 + test_path_is_missing .git/packed-refs
39 '
40
41 test_expect_success 'check that marking the packed-refs file works' '