diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-12-20 21:15:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-20 22:30:45 +0300 |
commit | 62d58cda69621eb2f70517c87f1baeeb7b2f398c (patch) | |
tree | 7ed27a30068d1c5ccf2e3640debb1b1bfe6959b6 /t/t1409-avoid-packing-refs.sh | |
parent | b87b02cfe6973ac8cc778e0463bc3ad6accb96a6 (diff) |
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>
Diffstat (limited to 't/t1409-avoid-packing-refs.sh')
-rwxr-xr-x | t/t1409-avoid-packing-refs.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t1409-avoid-packing-refs.sh b/t/t1409-avoid-packing-refs.sh index f74d890e82..be12fb6350 100755 --- a/t/t1409-avoid-packing-refs.sh +++ b/t/t1409-avoid-packing-refs.sh @@ -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' ' |