t6036, t6042: prefer test_path_is_file, test_path_is_missing

Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed May 24, 2018 at 00:04 UTC 5b0b9712d220e6e2b27d3bab9a5603c5e2573ae8
2 files changed +22 -22
t/t6036-recursive-corner-cases.sh
+2 -2
@@ -488,7 +488,7 @@ test_expect_success 'merge of D & E2 fails but has appropriate contents' '
488 test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file) &&
489 test $(git rev-parse :0:ignore-me) = $(git rev-parse A:ignore-me) &&
490
491 - test -f a~HEAD
491 + test_path_is_file a~HEAD
492 )
493 '
494
@@ -512,7 +512,7 @@ test_expect_success 'merge of E2 & D fails but has appropriate contents' '
512 test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file) &&
513 test $(git rev-parse :0:ignore-me) = $(git rev-parse A:ignore-me) &&
514
515 - test -f a~D^0
515 + test_path_is_file a~D^0
516 )
517 '
518
t/t6042-merge-rename-corner-cases.sh
+20 -20
@@ -38,7 +38,7 @@ test_expect_success "Does git preserve Gollum's precious artifact?" '
38 test_must_fail git merge -s recursive rename-the-ring &&
39
40 # Make sure git did not delete an untracked file
41 - test -f ring
41 + test_path_is_file ring
42 )
43 '
44
@@ -213,8 +213,8 @@ test_expect_failure 'detect rename/add-source and preserve all data' '
213 git ls-files -o >out &&
214 test_line_count = 1 out &&
215
216 - test -f a &&
217 - test -f b &&
216 + test_path_is_file a &&
217 + test_path_is_file b &&
218
219 test $(git rev-parse HEAD:b) = $(git rev-parse A:a) &&
220 test $(git rev-parse HEAD:a) = $(git rev-parse C:a)
@@ -236,8 +236,8 @@ test_expect_failure 'detect rename/add-source and preserve all data, merge other
236 git ls-files -o >out &&
237 test_line_count = 1 out &&
238
239 - test -f a &&
240 - test -f b &&
239 + test_path_is_file a &&
240 + test_path_is_file b &&
241
242 test $(git rev-parse HEAD:b) = $(git rev-parse A:a) &&
243 test $(git rev-parse HEAD:a) = $(git rev-parse C:a)
@@ -302,8 +302,8 @@ test_expect_success 'rename/directory conflict + clean content merge' '
302
303 test $(git rev-parse :2:newfile) = $(git hash-object expect) &&
304
305 - test -f newfile/realfile &&
306 - test -f newfile~HEAD
305 + test_path_is_file newfile/realfile &&
306 + test_path_is_file newfile~HEAD
307 )
308 '
309
@@ -340,8 +340,8 @@ test_expect_success 'rename/directory conflict + content merge conflict' '
340 test $(git rev-parse :2:newfile) = $(git rev-parse left-conflict:newfile) &&
341 test $(git rev-parse :3:newfile) = $(git rev-parse right:file) &&
342
343 - test -f newfile/realfile &&
344 - test -f newfile~HEAD
343 + test_path_is_file newfile/realfile &&
344 + test_path_is_file newfile~HEAD
345 )
346 '
347
@@ -394,7 +394,7 @@ test_expect_success 'disappearing dir in rename/directory conflict handled' '
394 echo 7 >>expect &&
395 test_cmp expect sub &&
396
397 - test -f sub
397 + test_path_is_file sub
398 )
399 '
400
@@ -453,10 +453,10 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
453 git ls-files -o >out &&
454 test_line_count = 3 out &&
455
456 - test ! -f a &&
457 - test ! -f b &&
458 - test -f c~HEAD &&
459 - test -f c~C^0 &&
456 + test_path_is_missing a &&
457 + test_path_is_missing b &&
458 + test_path_is_file c~HEAD &&
459 + test_path_is_file c~C^0 &&
460
461 test $(git hash-object c~HEAD) = $(git rev-parse C:a) &&
462 test $(git hash-object c~C^0) = $(git rev-parse B:b)
@@ -509,7 +509,7 @@ test_expect_success 'merge has correct working tree contents' '
509 test $(git rev-parse :3:b) = $(git rev-parse A:a) &&
510 test $(git rev-parse :2:c) = $(git rev-parse A:a) &&
511
512 - test ! -f a &&
512 + test_path_is_missing a &&
513 test $(git hash-object b) = $(git rev-parse A:a) &&
514 test $(git hash-object c) = $(git rev-parse A:a)
515 )
@@ -562,9 +562,9 @@ test_expect_failure 'detect conflict with rename/rename(1to2)/add-source merge'
562 test $(git rev-parse 2:b) = $(git rev-parse B:b) &&
563 test $(git rev-parse 3:c) = $(git rev-parse C:c) &&
564
565 - test -f a &&
566 - test -f b &&
567 - test -f c
565 + test_path_is_file a &&
566 + test_path_is_file b &&
567 + test_path_is_file c
568 )
569 '
570
@@ -664,8 +664,8 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting
664 test $(git hash-object b~HEAD) = $(git rev-parse C:b) &&
665 test $(git hash-object b~B\^0) = $(git rev-parse B:b) &&
666
667 - test ! -f b &&
668 - test ! -f c
667 + test_path_is_missing b &&
668 + test_path_is_missing c
669 )
670 '
671