Skip to content

Commit 12604a8

Browse files
Shubhamlmpgitster
authored andcommitted
t9801: replace test -f with test_path_is_file
Although `test -f` has the same functionality as test_path_is_file(), in the case where test_path_is_file() fails, we get much better debugging information. Replace `test -f` with test_path_is_file so that future developers will have a better experience debugging these test cases. Signed-off-by: Shubham Verma <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 59ec224 commit 12604a8

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

t/t9801-git-p4-branch.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,19 @@ test_expect_success 'git p4 clone simple branches' '
200200
git p4 clone --dest=. --detect-branches //depot@all &&
201201
git log --all --graph --decorate --stat &&
202202
git reset --hard p4/depot/branch1 &&
203-
test -f file1 &&
204-
test -f file2 &&
205-
test -f file3 &&
203+
test_path_is_file file1 &&
204+
test_path_is_file file2 &&
205+
test_path_is_file file3 &&
206206
grep update file2 &&
207207
git reset --hard p4/depot/branch2 &&
208-
test -f file1 &&
209-
test -f file2 &&
208+
test_path_is_file file1 &&
209+
test_path_is_file file2 &&
210210
test ! -f file3 &&
211211
! grep update file2 &&
212212
git reset --hard p4/depot/branch3 &&
213-
test -f file1 &&
214-
test -f file2 &&
215-
test -f file3 &&
213+
test_path_is_file file1 &&
214+
test_path_is_file file2 &&
215+
test_path_is_file file3 &&
216216
grep update file2 &&
217217
cd "$cli" &&
218218
cd branch1 &&
@@ -603,22 +603,22 @@ test_expect_success 'git p4 clone simple branches with base folder on server sid
603603
git p4 clone --dest=. --use-client-spec --detect-branches //depot@all &&
604604
git log --all --graph --decorate --stat &&
605605
git reset --hard p4/depot/branch1 &&
606-
test -f file1 &&
607-
test -f file2 &&
608-
test -f file3 &&
609-
test -f sub_file1 &&
606+
test_path_is_file file1 &&
607+
test_path_is_file file2 &&
608+
test_path_is_file file3 &&
609+
test_path_is_file sub_file1 &&
610610
grep update file2 &&
611611
git reset --hard p4/depot/branch2 &&
612-
test -f file1 &&
613-
test -f file2 &&
612+
test_path_is_file file1 &&
613+
test_path_is_file file2 &&
614614
test ! -f file3 &&
615-
test -f sub_file1 &&
615+
test_path_is_file sub_file1 &&
616616
! grep update file2 &&
617617
git reset --hard p4/depot/branch3 &&
618-
test -f file1 &&
619-
test -f file2 &&
620-
test -f file3 &&
621-
test -f sub_file1 &&
618+
test_path_is_file file1 &&
619+
test_path_is_file file2 &&
620+
test_path_is_file file3 &&
621+
test_path_is_file sub_file1 &&
622622
grep update file2 &&
623623
cd "$cli" &&
624624
cd branch1 &&

0 commit comments

Comments
 (0)