t3407: use test_path_is_missing
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>
Phillip Wood committed
Sep 13, 2021 at 15:19 UTC
0b7ae738a6a166d3b60af68c9b0984971baa7718
1 file changed
+5
-5
t/t3407-rebase-abort.sh
+5
-5
@@ -30,7 +30,7 @@ testrebase() {
30
test_path_is_dir "$state_dir" &&
31
git rebase --abort &&
32
test_cmp_rev to-rebase pre-rebase &&
33
- test ! -d "$state_dir"
33
+ test_path_is_missing "$state_dir"
34
'
35
36
test_expect_success "rebase$type --abort after --skip" '
@@ -42,7 +42,7 @@ testrebase() {
42
test_cmp_rev HEAD main &&
43
git rebase --abort &&
44
test_cmp_rev to-rebase pre-rebase &&
45
- test ! -d "$state_dir"
45
+ test_path_is_missing "$state_dir"
46
'
47
48
test_expect_success "rebase$type --abort after --continue" '
@@ -57,7 +57,7 @@ testrebase() {
57
test_cmp_rev ! HEAD main &&
58
git rebase --abort &&
59
test_cmp_rev to-rebase pre-rebase &&
60
- test ! -d "$state_dir"
60
+ test_path_is_missing "$state_dir"
61
'
62
63
test_expect_success "rebase$type --abort does not update reflog" '
@@ -92,7 +92,7 @@ test_expect_success 'rebase --apply --quit' '
92
head_before=$(git rev-parse HEAD) &&
93
git rebase --quit &&
94
test_cmp_rev HEAD $head_before &&
95
- test ! -d .git/rebase-apply
95
+ test_path_is_missing .git/rebase-apply
96
'
97
98
test_expect_success 'rebase --merge --quit' '
@@ -103,7 +103,7 @@ test_expect_success 'rebase --merge --quit' '
103
head_before=$(git rev-parse HEAD) &&
104
git rebase --quit &&
105
test_cmp_rev HEAD $head_before &&
106
- test ! -d .git/rebase-merge
106
+ test_path_is_missing .git/rebase-merge
107
'
108
109
test_done