]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3407: use test_path_is_missing
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Mon, 13 Sep 2021 15:19:16 +0000 (15:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Sep 2021 19:47:06 +0000 (12:47 -0700)
At the end of the test we expect the state directory to be missing,
but the tests only check it is not a directory.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3407-rebase-abort.sh

index 2c70230a4ebc32723118016220368869e9c6bb2d..7eba9ec1619ca94263c86b4d1e733c2aba9f6d1d 100755 (executable)
@@ -30,7 +30,7 @@ testrebase() {
                test_path_is_dir "$state_dir" &&
                git rebase --abort &&
                test_cmp_rev to-rebase pre-rebase &&
-               test ! -d "$state_dir"
+               test_path_is_missing "$state_dir"
        '
 
        test_expect_success "rebase$type --abort after --skip" '
@@ -42,7 +42,7 @@ testrebase() {
                test_cmp_rev HEAD main &&
                git rebase --abort &&
                test_cmp_rev to-rebase pre-rebase &&
-               test ! -d "$state_dir"
+               test_path_is_missing "$state_dir"
        '
 
        test_expect_success "rebase$type --abort after --continue" '
@@ -57,7 +57,7 @@ testrebase() {
                test_cmp_rev ! HEAD main &&
                git rebase --abort &&
                test_cmp_rev to-rebase pre-rebase &&
-               test ! -d "$state_dir"
+               test_path_is_missing "$state_dir"
        '
 
        test_expect_success "rebase$type --abort does not update reflog" '
@@ -92,7 +92,7 @@ test_expect_success 'rebase --apply --quit' '
        head_before=$(git rev-parse HEAD) &&
        git rebase --quit &&
        test_cmp_rev HEAD $head_before &&
-       test ! -d .git/rebase-apply
+       test_path_is_missing .git/rebase-apply
 '
 
 test_expect_success 'rebase --merge --quit' '
@@ -103,7 +103,7 @@ test_expect_success 'rebase --merge --quit' '
        head_before=$(git rev-parse HEAD) &&
        git rebase --quit &&
        test_cmp_rev HEAD $head_before &&
-       test ! -d .git/rebase-merge
+       test_path_is_missing .git/rebase-merge
 '
 
 test_done