diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-09 21:21:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-09 21:21:20 +0300 |
commit | a0d752c1a3c537ea71ccd562c13606cddcb34554 (patch) | |
tree | 229ecdecee5a56a38e15eab4969d47d96589b93e /t | |
parent | 0e0d717537547e8fcba441e4f65237c7fd227a34 (diff) | |
parent | a51d9e8f07652ded830cb50187be74c1709816d8 (diff) |
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
Diffstat (limited to 't')
-rwxr-xr-x | t/t1050-large.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh index d3b2adb28b..184b479a21 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -53,7 +53,8 @@ test_expect_success 'add a large file or two' ' for p in .git/objects/pack/pack-*.pack do 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 continue fi @@ -65,7 +66,7 @@ test_expect_success 'add a large file or two' ' test $cnt = 2 && for l in .git/objects/??/?????????????????????????????????????? do - test -f "$l" || continue + test_path_is_file "$l" || continue bad=t done && test -z "$bad" && @@ -76,7 +77,8 @@ test_expect_success 'add a large file or two' ' for p in .git/objects/pack/pack-*.pack do 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 continue fi @@ -111,7 +113,7 @@ test_expect_success 'packsize limit' ' count=0 && for pi in .git/objects/pack/pack-*.idx do - test -f "$pi" && count=$(( $count + 1 )) + test_path_is_file "$pi" && count=$(( $count + 1 )) done && test $count = 2 && |