Skip to content

Commit a0d752c

Browse files
committed
Merge branch 'rj/t1050-use-test-path-is-file'
Code cleanup. * rj/t1050-use-test-path-is-file: t1050: replace test -f with test_path_is_file
2 parents 0e0d717 + a51d9e8 commit a0d752c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

t/t1050-large.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ test_expect_success 'add a large file or two' '
5353
for p in .git/objects/pack/pack-*.pack
5454
do
5555
count=$(( $count + 1 ))
56-
if test -f "$p" && idx=${p%.pack}.idx && test -f "$idx"
56+
if test_path_is_file "$p" &&
57+
idx=${p%.pack}.idx && test_path_is_file "$idx"
5758
then
5859
continue
5960
fi
@@ -65,7 +66,7 @@ test_expect_success 'add a large file or two' '
6566
test $cnt = 2 &&
6667
for l in .git/objects/??/??????????????????????????????????????
6768
do
68-
test -f "$l" || continue
69+
test_path_is_file "$l" || continue
6970
bad=t
7071
done &&
7172
test -z "$bad" &&
@@ -76,7 +77,8 @@ test_expect_success 'add a large file or two' '
7677
for p in .git/objects/pack/pack-*.pack
7778
do
7879
count=$(( $count + 1 ))
79-
if test -f "$p" && idx=${p%.pack}.idx && test -f "$idx"
80+
if test_path_is_file "$p" &&
81+
idx=${p%.pack}.idx && test_path_is_file "$idx"
8082
then
8183
continue
8284
fi
@@ -111,7 +113,7 @@ test_expect_success 'packsize limit' '
111113
count=0 &&
112114
for pi in .git/objects/pack/pack-*.idx
113115
do
114-
test -f "$pi" && count=$(( $count + 1 ))
116+
test_path_is_file "$pi" && count=$(( $count + 1 ))
115117
done &&
116118
test $count = 2 &&
117119

0 commit comments

Comments
 (0)