git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1300: use test helpers instead of shell primitives
@ 2026-01-02  6:20 pushkarkumarsingh1970
  2026-01-02  9:09 ` Karthik Nayak
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: pushkarkumarsingh1970 @ 2026-01-02  6:20 UTC (permalink / raw)
  To: git; +Cc: Pushkar Singh

From: Pushkar Singh <pushkarkumarsingh1970@gmail.com>

Replace plain "test -f" checks with "test_path_is_file" and symbolic
link checks with "test_path_is_symlink". The test framework helpers
provide clearer diagnostics and better consistency across the test
suite.

Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
---
 t/t1300-config.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 358d636379..9850fcd5b5 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -1232,12 +1232,12 @@ test_expect_success SYMLINKS 'symlinked configuration' '
 	test_when_finished "rm myconfig" &&
 	ln -s notyet myconfig &&
 	git config --file=myconfig test.frotz nitfol &&
-	test -h myconfig &&
-	test -f notyet &&
+	test_path_is_symlink myconfig &&
+	test_path_is_file notyet &&
 	test "z$(git config --file=notyet test.frotz)" = znitfol &&
 	git config --file=myconfig test.xyzzy rezrov &&
-	test -h myconfig &&
-	test -f notyet &&
+	test_path_is_symlink myconfig &&
+	test_path_is_file notyet &&
 	cat >expect <<-\EOF &&
 	nitfol
 	rezrov
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-01-05 14:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-02  6:20 [PATCH] t1300: use test helpers instead of shell primitives pushkarkumarsingh1970
2026-01-02  9:09 ` Karthik Nayak
2026-01-02  9:39   ` Pushkar Singh
2026-01-04  2:39 ` Junio C Hamano
2026-01-04 12:41 ` [PATCH v3] t1300: use test helpers instead of test builtins Pushkar Singh
2026-01-04 15:34   ` Abraham Samuel Adekunle
2026-01-04 19:40     ` Pushkar Singh
2026-01-05 10:55       ` Karthik Nayak
2026-01-05 14:13         ` Samuel Abraham
2026-01-04 19:47   ` [PATCH v4] " Pushkar Singh
2026-01-05 10:55     ` Karthik Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).