git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[GSoC][PATCH 2/2] t4131: use helper function to replace test -f <path>

From
HJHarshit Jain <harshitjain1371999@gmail.com>
Date
Mar 19, 2020, 13:29 UTC
Message-ID
<20200319132957.17813-3-harshitjain1371999@gmail.com>
In-Reply-To
<20200319132957.17813-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
Previous: Junio C HamanoNext: Shourya Shukla
Message 6 of 17 in “t4131: update test script”
  1. Harshit JainMar 19, 2020
  2. [GSoC][PATCH 1/2] t4131: modernize styleHarshit Jain, Mar 19, 2020
  3. Shourya ShuklaMar 19, 2020
  4. Harshit JainMar 19, 2020
  5. Junio C HamanoMar 19, 2020
  6. [GSoC][PATCH 2/2] t4131: use helper function to replace test -f <path>Harshit Jain, Mar 19, 2020
  7. Shourya ShuklaMar 19, 2020
  8. Kaartic SivaraamMar 19, 2020
  9. Harshit JainMar 19, 2020
  10. Shourya ShuklaMar 20, 2020
  11. Junio C HamanoMar 19, 2020
  12. [GSoC][Patch 0/2] made the changes as per community suggestionsHarshit Jain, Mar 20, 2020
  13. 1/2 t4131: modernize styleHarshit Jain, Mar 20, 2020
  14. Shourya ShuklaMar 20, 2020
  15. Harshit JainMar 20, 2020
  16. 2/2 t4131: use helper function to replace 'test -f'Harshit Jain, Mar 20, 2020
  17. Shourya ShuklaMar 20, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.