public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [GSoC PATCH] t9200: use helpers to replace test -f <path> and test -d <path>
@ 2026-03-09 15:09 Pablo Sabater
  2026-03-09 15:20 ` Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Pablo Sabater @ 2026-03-09 15:09 UTC (permalink / raw)
  To: git; +Cc: Pablo Sabater

Replaced 'test -f' and 'test -d' with 'test_path_is_file' and 'test_path_is_dir'

I've used 'git grep "test -f" t/t9*.sh' to find a file without the fix done as specified on the microproject information
I've done '9*' because the ones I've found first had already fix patches.
I've taken as example another patch sent 't4131' from Junio C Hamano https://lore.kernel.org/git/xmqq1rpodn25.fsf@gitster.c.googlers.com/#r

Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
---
 t/t9200-git-cvsexportcommit.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index a44eabf0d8..4507e8e6db 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -31,7 +31,7 @@ export CVSROOT CVSWORK GIT_DIR
 rm -rf "$CVSROOT" "$CVSWORK"
 
 cvs init &&
-test -d "$CVSROOT" &&
+test_path_is_dir "$CVSROOT" &&
 cvs -Q co -d "$CVSWORK" . &&
 echo >empty &&
 git add empty &&
@@ -303,7 +303,7 @@ test_expect_success 're-commit a removed filename which remains in CVS attic' '
 	git commit -m "Added attic_gremlin" &&
 	git cvsexportcommit -w "$CVSWORK" -c HEAD &&
 	(cd "$CVSWORK" && cvs -Q update -d) &&
-	test -f "$CVSWORK/attic_gremlin"
+	test_path_is_file "$CVSWORK/attic_gremlin"
 '
 
 # the state of the CVS sandbox may be indeterminate for ' space'
-- 
2.43.0


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

end of thread, other threads:[~2026-03-12 17:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 15:09 [GSoC PATCH] t9200: use helpers to replace test -f <path> and test -d <path> Pablo Sabater
2026-03-09 15:20 ` Junio C Hamano
2026-03-09 15:39   ` Pablo
2026-03-09 16:28 ` [GSoC PATCH v2] t9200: replace test -f/-d with modern path helpers Pablo Sabater
2026-03-09 21:03   ` Junio C Hamano
2026-03-09 22:54     ` Pablo
2026-03-09 23:01 ` [GSoC PATCH v3] " Pablo Sabater
2026-03-09 23:26   ` Junio C Hamano
2026-03-11 10:59   ` Pablo
2026-03-11 17:52   ` Junio C Hamano
2026-03-11 19:06     ` Pablo
2026-03-11 19:42       ` Junio C Hamano
2026-03-11 19:49         ` Pablo
2026-03-11 20:31           ` Junio C Hamano
2026-03-12 17:33 ` [GSoC PATCH v4] t9200: replace test -f with modern path helper Pablo Sabater
2026-03-12 17:37   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox