1
0
mirror of https://github.com/git/git.git synced 2024-09-28 10:00:54 +02:00

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>
This commit is contained in:
Denton Liu 2019-12-20 10:15:58 -08:00 committed by Junio C Hamano
parent b87b02cfe6
commit 62d58cda69

View File

@ -27,15 +27,15 @@ test_expect_success 'setup' '
'
test_expect_success 'do not create packed-refs file gratuitously' '
test_must_fail test -f .git/packed-refs &&
test_path_is_missing .git/packed-refs &&
git update-ref refs/heads/foo $A &&
test_must_fail test -f .git/packed-refs &&
test_path_is_missing .git/packed-refs &&
git update-ref refs/heads/foo $B &&
test_must_fail test -f .git/packed-refs &&
test_path_is_missing .git/packed-refs &&
git update-ref refs/heads/foo $C $B &&
test_must_fail test -f .git/packed-refs &&
test_path_is_missing .git/packed-refs &&
git update-ref -d refs/heads/foo &&
test_must_fail test -f .git/packed-refs
test_path_is_missing .git/packed-refs
'
test_expect_success 'check that marking the packed-refs file works' '