]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t9160: use test_path_is_missing()
authorDenton Liu <liu.denton@gmail.com>
Mon, 20 Apr 2020 08:54:43 +0000 (04:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Apr 2020 20:12:13 +0000 (13:12 -0700)
The test_must_fail() function should only be used for git commands since
we assume that external commands work sanely. Since, not only should
this file not exist, but there shouldn't exit _any_ filesystem entity in
these paths, replace `test_must_fail test -f` with
`test_path_is_missing`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9160-git-svn-preserve-empty-dirs.sh

index 0ede3cfedb2a7b5ac66238a61615395001885a94..36c6b1a12ffd95a1d6fe4ee4efd18a47f1581078 100755 (executable)
@@ -86,8 +86,8 @@ test_expect_success 'remove non-last entry from directory' '
                cd "$GIT_REPO" &&
                git checkout HEAD~2
        ) &&
-       test_must_fail test -f "$GIT_REPO"/2/.gitignore &&
-       test_must_fail test -f "$GIT_REPO"/3/.gitignore
+       test_path_is_missing "$GIT_REPO"/2/.gitignore &&
+       test_path_is_missing "$GIT_REPO"/3/.gitignore
 '
 
 # After re-cloning the repository with --placeholder-file specified, there