t1050: replace test -f with test_path_is_file
Use test_path_is_file() instead of 'test -f' for better debugging information. Signed-off-by: Rasmus Jonsson <wasmus@zom.bi> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
d0654dc308
commit
a51d9e8f07
|
@ -53,7 +53,8 @@ test_expect_success 'add a large file or two' '
|
||||||
for p in .git/objects/pack/pack-*.pack
|
for p in .git/objects/pack/pack-*.pack
|
||||||
do
|
do
|
||||||
count=$(( $count + 1 ))
|
count=$(( $count + 1 ))
|
||||||
if test -f "$p" && idx=${p%.pack}.idx && test -f "$idx"
|
if test_path_is_file "$p" &&
|
||||||
|
idx=${p%.pack}.idx && test_path_is_file "$idx"
|
||||||
then
|
then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -65,7 +66,7 @@ test_expect_success 'add a large file or two' '
|
||||||
test $cnt = 2 &&
|
test $cnt = 2 &&
|
||||||
for l in .git/objects/??/??????????????????????????????????????
|
for l in .git/objects/??/??????????????????????????????????????
|
||||||
do
|
do
|
||||||
test -f "$l" || continue
|
test_path_is_file "$l" || continue
|
||||||
bad=t
|
bad=t
|
||||||
done &&
|
done &&
|
||||||
test -z "$bad" &&
|
test -z "$bad" &&
|
||||||
|
@ -76,7 +77,8 @@ test_expect_success 'add a large file or two' '
|
||||||
for p in .git/objects/pack/pack-*.pack
|
for p in .git/objects/pack/pack-*.pack
|
||||||
do
|
do
|
||||||
count=$(( $count + 1 ))
|
count=$(( $count + 1 ))
|
||||||
if test -f "$p" && idx=${p%.pack}.idx && test -f "$idx"
|
if test_path_is_file "$p" &&
|
||||||
|
idx=${p%.pack}.idx && test_path_is_file "$idx"
|
||||||
then
|
then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -111,7 +113,7 @@ test_expect_success 'packsize limit' '
|
||||||
count=0 &&
|
count=0 &&
|
||||||
for pi in .git/objects/pack/pack-*.idx
|
for pi in .git/objects/pack/pack-*.idx
|
||||||
do
|
do
|
||||||
test -f "$pi" && count=$(( $count + 1 ))
|
test_path_is_file "$pi" && count=$(( $count + 1 ))
|
||||||
done &&
|
done &&
|
||||||
test $count = 2 &&
|
test $count = 2 &&
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue