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 <shubhunic@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shubham Verma committed
Mar 3, 2021 at 00:20 UTC
12604a8d0c0a7d706c7be7be607a584260042ca9
1 file changed
+19
-19
t/t9801-git-p4-branch.sh
+19
-19
@@ -200,19 +200,19 @@ test_expect_success 'git p4 clone simple branches' '
200
git p4 clone --dest=. --detect-branches //depot@all &&
201
git log --all --graph --decorate --stat &&
202
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 &&
206
grep update file2 &&
207
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 &&
210
test ! -f file3 &&
211
! grep update file2 &&
212
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 &&
216
grep update file2 &&
217
cd "$cli" &&
218
cd branch1 &&
@@ -603,22 +603,22 @@ test_expect_success 'git p4 clone simple branches with base folder on server sid
603
git p4 clone --dest=. --use-client-spec --detect-branches //depot@all &&
604
git log --all --graph --decorate --stat &&
605
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 &&
610
grep update file2 &&
611
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 &&
614
test ! -f file3 &&
615
- test -f sub_file1 &&
615
+ test_path_is_file sub_file1 &&
616
! grep update file2 &&
617
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 &&
622
grep update file2 &&
623
cd "$cli" &&
624
cd branch1 &&