Skip to content

Commit b9c55cf

Browse files
committed
Merge branch 'rj/pack-refs-tests-path-is-helpers'
Test updates. * rj/pack-refs-tests-path-is-helpers: t/pack-refs-tests: use test_path_is_missing
2 parents 9d9cd38 + 2f05039 commit b9c55cf

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

t/pack-refs-tests.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ test_expect_success 'see if a branch still exists after git ${pack_refs} --prune
6161
test_expect_success 'see if git ${pack_refs} --prune remove ref files' '
6262
git branch f &&
6363
git ${pack_refs} --all --prune &&
64-
! test -f .git/refs/heads/f
64+
test_path_is_missing .git/refs/heads/f
6565
'
6666

6767
test_expect_success 'see if git ${pack_refs} --prune removes empty dirs' '
6868
git branch r/s/t &&
6969
git ${pack_refs} --all --prune &&
70-
! test -e .git/refs/heads/r
70+
test_path_is_missing .git/refs/heads/r
7171
'
7272

7373
test_expect_success 'git branch g should work when git branch g/h has been deleted' '
@@ -111,43 +111,43 @@ test_expect_success 'test excluded refs are not packed' '
111111
git branch dont_pack2 &&
112112
git branch pack_this &&
113113
git ${pack_refs} --all --exclude "refs/heads/dont_pack*" &&
114-
test -f .git/refs/heads/dont_pack1 &&
115-
test -f .git/refs/heads/dont_pack2 &&
116-
! test -f .git/refs/heads/pack_this'
114+
test_path_is_file .git/refs/heads/dont_pack1 &&
115+
test_path_is_file .git/refs/heads/dont_pack2 &&
116+
test_path_is_missing .git/refs/heads/pack_this'
117117

118118
test_expect_success 'test --no-exclude refs clears excluded refs' '
119119
git branch dont_pack3 &&
120120
git branch dont_pack4 &&
121121
git ${pack_refs} --all --exclude "refs/heads/dont_pack*" --no-exclude &&
122-
! test -f .git/refs/heads/dont_pack3 &&
123-
! test -f .git/refs/heads/dont_pack4'
122+
test_path_is_missing .git/refs/heads/dont_pack3 &&
123+
test_path_is_missing .git/refs/heads/dont_pack4'
124124

125125
test_expect_success 'test only included refs are packed' '
126126
git branch pack_this1 &&
127127
git branch pack_this2 &&
128128
git tag dont_pack5 &&
129129
git ${pack_refs} --include "refs/heads/pack_this*" &&
130-
test -f .git/refs/tags/dont_pack5 &&
131-
! test -f .git/refs/heads/pack_this1 &&
132-
! test -f .git/refs/heads/pack_this2'
130+
test_path_is_file .git/refs/tags/dont_pack5 &&
131+
test_path_is_missing .git/refs/heads/pack_this1 &&
132+
test_path_is_missing .git/refs/heads/pack_this2'
133133

134134
test_expect_success 'test --no-include refs clears included refs' '
135135
git branch pack1 &&
136136
git branch pack2 &&
137137
git ${pack_refs} --include "refs/heads/pack*" --no-include &&
138-
test -f .git/refs/heads/pack1 &&
139-
test -f .git/refs/heads/pack2'
138+
test_path_is_file .git/refs/heads/pack1 &&
139+
test_path_is_file .git/refs/heads/pack2'
140140

141141
test_expect_success 'test --exclude takes precedence over --include' '
142142
git branch dont_pack5 &&
143143
git ${pack_refs} --include "refs/heads/pack*" --exclude "refs/heads/pack*" &&
144-
test -f .git/refs/heads/dont_pack5'
144+
test_path_is_file .git/refs/heads/dont_pack5'
145145

146146
test_expect_success 'see if up-to-date packed refs are preserved' '
147147
git branch q &&
148148
git ${pack_refs} --all --prune &&
149149
git update-ref refs/heads/q refs/heads/q &&
150-
! test -f .git/refs/heads/q
150+
test_path_is_missing .git/refs/heads/q
151151
'
152152

153153
test_expect_success 'pack, prune and repack' '

0 commit comments

Comments
 (0)