threads / patch / 64984

patcht9812: modernize test path helpers

Subject: [GSOC PATCH] t9812: modernize test path helpers

## tl;dr

One message between Feb 12, 2026 and Feb 12, 2026. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ashwani Kumar Kamal· Feb 12, 2026, 05:45 UTC · lore

Replace assertion-style 'test -f' checks with Git's test_path_is_file() helper for clearer failures and consistency.

Signed-off-by: Ashwani Kumar Kamal <ashwanikamal.im421@gmail.com>
---
 t/t9812-git-p4-wildcards.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to t/t9812-git-p4-wildcards.sh +4 −4
diff --git a/t/t9812-git-p4-wildcards.sh b/t/t9812-git-p4-wildcards.sh
index 254a7c2446..e91004ee79 100755
--- a/t/t9812-git-p4-wildcards.sh
+++ b/t/t9812-git-p4-wildcards.sh
@@ -30,13 +30,13 @@ test_expect_success 'wildcard files git p4 clone' '
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
-		test -f file-wild#hash &&
+		test_path_is_file file-wild#hash &&
 		if test_have_prereq !MINGW,!CYGWIN
 		then
-			test -f file-wild\*star
+			test_path_is_file file-wild\*star
 		fi &&
-		test -f file-wild@at &&
-		test -f file-wild%percent
+		test_path_is_file file-wild@at &&
+		test_path_is_file file-wild%percent
 	)
 '
 
-- 
2.39.5

← back to recent threads