@@ -38,7 +38,7 @@ test_expect_success "Does git preserve Gollum's precious artifact?" '
38
38
test_must_fail git merge -s recursive rename-the-ring &&
39
39
40
40
# Make sure git did not delete an untracked file
41
- test -f ring
41
+ test_path_is_file ring
42
42
)
43
43
'
44
44
@@ -213,8 +213,8 @@ test_expect_failure 'detect rename/add-source and preserve all data' '
213
213
git ls-files -o >out &&
214
214
test_line_count = 1 out &&
215
215
216
- test -f a &&
217
- test -f b &&
216
+ test_path_is_file a &&
217
+ test_path_is_file b &&
218
218
219
219
test $(git rev-parse HEAD:b) = $(git rev-parse A:a) &&
220
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
236
git ls-files -o >out &&
237
237
test_line_count = 1 out &&
238
238
239
- test -f a &&
240
- test -f b &&
239
+ test_path_is_file a &&
240
+ test_path_is_file b &&
241
241
242
242
test $(git rev-parse HEAD:b) = $(git rev-parse A:a) &&
243
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
302
303
303
test $(git rev-parse :2:newfile) = $(git hash-object expect) &&
304
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
307
)
308
308
'
309
309
@@ -340,8 +340,8 @@ test_expect_success 'rename/directory conflict + content merge conflict' '
340
340
test $(git rev-parse :2:newfile) = $(git rev-parse left-conflict:newfile) &&
341
341
test $(git rev-parse :3:newfile) = $(git rev-parse right:file) &&
342
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
345
)
346
346
'
347
347
@@ -394,7 +394,7 @@ test_expect_success 'disappearing dir in rename/directory conflict handled' '
394
394
echo 7 >>expect &&
395
395
test_cmp expect sub &&
396
396
397
- test -f sub
397
+ test_path_is_file sub
398
398
)
399
399
'
400
400
@@ -453,10 +453,10 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
453
453
git ls-files -o >out &&
454
454
test_line_count = 3 out &&
455
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
460
461
461
test $(git hash-object c~HEAD) = $(git rev-parse C:a) &&
462
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
509
test $(git rev-parse :3:b) = $(git rev-parse A:a) &&
510
510
test $(git rev-parse :2:c) = $(git rev-parse A:a) &&
511
511
512
- test ! -f a &&
512
+ test_path_is_missing a &&
513
513
test $(git hash-object b) = $(git rev-parse A:a) &&
514
514
test $(git hash-object c) = $(git rev-parse A:a)
515
515
)
@@ -562,9 +562,9 @@ test_expect_failure 'detect conflict with rename/rename(1to2)/add-source merge'
562
562
test $(git rev-parse 2:b) = $(git rev-parse B:b) &&
563
563
test $(git rev-parse 3:c) = $(git rev-parse C:c) &&
564
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
568
)
569
569
'
570
570
@@ -664,8 +664,8 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting
664
664
test $(git hash-object b~HEAD) = $(git rev-parse C:b) &&
665
665
test $(git hash-object b~B\^0) = $(git rev-parse B:b) &&
666
666
667
- test ! -f b &&
668
- test ! -f c
667
+ test_path_is_missing b &&
668
+ test_path_is_missing c
669
669
)
670
670
'
671
671
0 commit comments