diff mbox series

[2/2] t4131: use helper function to replace 'test -f'

Message ID 20200320130845.23257-3-harshitjain1371999@gmail.com (mailing list archive)
State New, archived
Headers show
Series made the changes as per community suggestions | expand

Commit Message

Harshit Jain March 20, 2020, 1:08 p.m. UTC
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 mbox series

Patch

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