t/am: use test_path_is_missing() where appropriate

Replace instances of ! test -d with test_path_is_missing. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramkumar Ramachandra committed Jun 15, 2013 at 18:13 UTC 61e0eb9de268cab90ea2563957b4c74c77e82b48
1 file changed +17 -17
t/t4150-am.sh
+17 -17
@@ -147,7 +147,7 @@ test_expect_success 'am applies patch correctly' '
147 git checkout first &&
148 test_tick &&
149 git am <patch1 &&
150 - ! test -d .git/rebase-apply &&
150 + test_path_is_missing .git/rebase-apply &&
151 git diff --exit-code second &&
152 test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
153 test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -158,7 +158,7 @@ test_expect_success 'am applies patch e-mail not in a mbox' '
158 git reset --hard &&
159 git checkout first &&
160 git am patch1.eml &&
161 - ! test -d .git/rebase-apply &&
161 + test_path_is_missing .git/rebase-apply &&
162 git diff --exit-code second &&
163 test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
164 test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -169,7 +169,7 @@ test_expect_success 'am applies patch e-mail not in a mbox with CRLF' '
169 git reset --hard &&
170 git checkout first &&
171 git am patch1-crlf.eml &&
172 - ! test -d .git/rebase-apply &&
172 + test_path_is_missing .git/rebase-apply &&
173 git diff --exit-code second &&
174 test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
175 test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -180,7 +180,7 @@ test_expect_success 'am applies patch e-mail with preceding whitespace' '
180 git reset --hard &&
181 git checkout first &&
182 git am patch1-ws.eml &&
183 - ! test -d .git/rebase-apply &&
183 + test_path_is_missing .git/rebase-apply &&
184 git diff --exit-code second &&
185 test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
186 test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -206,7 +206,7 @@ test_expect_success 'am changes committer and keeps author' '
206 git reset --hard &&
207 git checkout first &&
208 git am patch2 &&
209 - ! test -d .git/rebase-apply &&
209 + test_path_is_missing .git/rebase-apply &&
210 test "$(git rev-parse master^^)" = "$(git rev-parse HEAD^^)" &&
211 git diff --exit-code master..HEAD &&
212 git diff --exit-code master^..HEAD^ &&
@@ -258,7 +258,7 @@ test_expect_success 'am --keep really keeps the subject' '
258 git reset --hard &&
259 git checkout HEAD^ &&
260 git am --keep patch4 &&
261 - ! test -d .git/rebase-apply &&
261 + test_path_is_missing .git/rebase-apply &&
262 git cat-file commit HEAD >actual &&
263 grep "Re: Re: Re: \[PATCH 1/5 v2\] \[foo\] third" actual
264 '
@@ -268,7 +268,7 @@ test_expect_success 'am --keep-non-patch really keeps the non-patch part' '
268 git reset --hard &&
269 git checkout HEAD^ &&
270 git am --keep-non-patch patch4 &&
271 - ! test -d .git/rebase-apply &&
271 + test_path_is_missing .git/rebase-apply &&
272 git cat-file commit HEAD >actual &&
273 grep "^\[foo\] third" actual
274 '
@@ -283,7 +283,7 @@ test_expect_success 'am -3 falls back to 3-way merge' '
283 test_tick &&
284 git commit -m "copied stuff" &&
285 git am -3 lorem-move.patch &&
286 - ! test -d .git/rebase-apply &&
286 + test_path_is_missing .git/rebase-apply &&
287 git diff --exit-code lorem
288 '
289
@@ -297,7 +297,7 @@ test_expect_success 'am -3 -p0 can read --no-prefix patch' '
297 test_tick &&
298 git commit -m "copied stuff" &&
299 git am -3 -p0 lorem-zero.patch &&
300 - ! test -d .git/rebase-apply &&
300 + test_path_is_missing .git/rebase-apply &&
301 git diff --exit-code lorem
302 '
303
@@ -307,7 +307,7 @@ test_expect_success 'am can rename a file' '
307 git reset --hard &&
308 git checkout lorem^0 &&
309 git am rename.patch &&
310 - ! test -d .git/rebase-apply &&
310 + test_path_is_missing .git/rebase-apply &&
311 git update-index --refresh &&
312 git diff --exit-code rename
313 '
@@ -318,7 +318,7 @@ test_expect_success 'am -3 can rename a file' '
318 git reset --hard &&
319 git checkout lorem^0 &&
320 git am -3 rename.patch &&
321 - ! test -d .git/rebase-apply &&
321 + test_path_is_missing .git/rebase-apply &&
322 git update-index --refresh &&
323 git diff --exit-code rename
324 '
@@ -329,7 +329,7 @@ test_expect_success 'am -3 can rename a file after falling back to 3-way merge'
329 git reset --hard &&
330 git checkout lorem^0 &&
331 git am -3 rename-add.patch &&
332 - ! test -d .git/rebase-apply &&
332 + test_path_is_missing .git/rebase-apply &&
333 git update-index --refresh &&
334 git diff --exit-code rename
335 '
@@ -358,7 +358,7 @@ test_expect_success 'am pauses on conflict' '
358 test_expect_success 'am --skip works' '
359 echo goodbye >expected &&
360 git am --skip &&
361 - ! test -d .git/rebase-apply &&
361 + test_path_is_missing .git/rebase-apply &&
362 git diff --exit-code lorem2^^ -- file &&
363 test_cmp expected another
364 '
@@ -379,7 +379,7 @@ test_expect_success 'am --resolved works' '
379 echo resolved >>file &&
380 git add file &&
381 git am --resolved &&
382 - ! test -d .git/rebase-apply &&
382 + test_path_is_missing .git/rebase-apply &&
383 test_cmp expected another
384 '
385
@@ -388,7 +388,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '
388 git reset --hard &&
389 git checkout first &&
390 cat pine patch1 | git am &&
391 - ! test -d .git/rebase-apply &&
391 + test_path_is_missing .git/rebase-apply &&
392 git diff --exit-code master^..HEAD
393 '
394
@@ -397,7 +397,7 @@ test_expect_success 'am fails on mail without patch' '
397 git reset --hard &&
398 test_must_fail git am <failmail &&
399 git am --abort &&
400 - ! test -d .git/rebase-apply
400 + test_path_is_missing .git/rebase-apply
401 '
402
403 test_expect_success 'am fails on empty patch' '
@@ -406,7 +406,7 @@ test_expect_success 'am fails on empty patch' '
406 echo "---" >>failmail &&
407 test_must_fail git am <failmail &&
408 git am --skip &&
409 - ! test -d .git/rebase-apply
409 + test_path_is_missing .git/rebase-apply
410 '
411
412 test_expect_success 'am works from stdin in subdirectory' '