[PATCH 2/2] t4131: use helper function to replace 'test -f'
- From
- Harshit Jain <harshitjain1371999@gmail.com>
- Date
- Mar 20, 2020, 13:08 UTC
- Message-ID
- <20200320130845.23257-3-harshitjain1371999@gmail.com>
- In-Reply-To
- <20200320130845.23257-1-harshitjain1371999@gmail.com>
Replace 'test -f' with the helper function 'test_path_is_file' as the helper function improves the code readability and also gives better error messages.
Signed-off-by: Harshit Jain <harshitjain1371999@gmail.com> --- t/t4131-apply-fake-ancestor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4131-apply-fake-ancestor.sh b/t/t4131-apply-fake-ancestor.sh index 828d1a355b..21ee359632 100755 --- a/t/t4131-apply-fake-ancestor.sh +++ b/t/t4131-apply-fake-ancestor.sh @@ -33,7 +33,7 @@ test_expect_success 'apply --build-fake-ancestor in a subdirectory' ' ( cd sub && git apply --build-fake-ancestor 3.ancestor ../3.patch && - test -f 3.ancestor + test_path_is_file 3.ancestor ) && git apply --build-fake-ancestor 3.ancestor 3.patch && test_cmp sub/3.ancestor 3.ancestor
-- 2.26.0.rc2