Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Verma <shubhunic@gmail.com>2021-03-02 21:50:56 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-04 04:11:31 +0300
commit12604a8d0c0a7d706c7be7be607a584260042ca9 (patch)
tree63389d4cec62011172937951f1a8837568b5218c /t/t9801-git-p4-branch.sh
parent59ec22464f6c2b170b05f287e00740ea2288fe5c (diff)
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>
Diffstat (limited to 't/t9801-git-p4-branch.sh')
-rwxr-xr-xt/t9801-git-p4-branch.sh38
1 files changed, 19 insertions, 19 deletions
diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh
index a3abd778f9..ebdba0bde8 100755
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
@@ -200,19 +200,19 @@ test_expect_success 'git p4 clone simple branches' '
git p4 clone --dest=. --detect-branches //depot@all &&
git log --all --graph --decorate --stat &&
git reset --hard p4/depot/branch1 &&
- test -f file1 &&
- test -f file2 &&
- test -f file3 &&
+ test_path_is_file file1 &&
+ test_path_is_file file2 &&
+ test_path_is_file file3 &&
grep update file2 &&
git reset --hard p4/depot/branch2 &&
- test -f file1 &&
- test -f file2 &&
+ test_path_is_file file1 &&
+ test_path_is_file file2 &&
test ! -f file3 &&
! grep update file2 &&
git reset --hard p4/depot/branch3 &&
- test -f file1 &&
- test -f file2 &&
- test -f file3 &&
+ test_path_is_file file1 &&
+ test_path_is_file file2 &&
+ test_path_is_file file3 &&
grep update file2 &&
cd "$cli" &&
cd branch1 &&
@@ -603,22 +603,22 @@ test_expect_success 'git p4 clone simple branches with base folder on server sid
git p4 clone --dest=. --use-client-spec --detect-branches //depot@all &&
git log --all --graph --decorate --stat &&
git reset --hard p4/depot/branch1 &&
- test -f file1 &&
- test -f file2 &&
- test -f file3 &&
- test -f sub_file1 &&
+ test_path_is_file file1 &&
+ test_path_is_file file2 &&
+ test_path_is_file file3 &&
+ test_path_is_file sub_file1 &&
grep update file2 &&
git reset --hard p4/depot/branch2 &&
- test -f file1 &&
- test -f file2 &&
+ test_path_is_file file1 &&
+ test_path_is_file file2 &&
test ! -f file3 &&
- test -f sub_file1 &&
+ test_path_is_file sub_file1 &&
! grep update file2 &&
git reset --hard p4/depot/branch3 &&
- test -f file1 &&
- test -f file2 &&
- test -f file3 &&
- test -f sub_file1 &&
+ test_path_is_file file1 &&
+ test_path_is_file file2 &&
+ test_path_is_file file3 &&
+ test_path_is_file sub_file1 &&
grep update file2 &&
cd "$cli" &&
cd branch1 &&