git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file'
@ 2025-06-03  5:20 Derick W. de M. Frias
  2025-06-03  6:16 ` Patrick Steinhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Derick W. de M. Frias @ 2025-06-03  5:20 UTC (permalink / raw)
  To: git; +Cc: DerickWMFrias

From: DerickWMFrias <derick.william.moraes@gmail.com>

'test_path_is_file' and 'test_path_is_dir' are modern path checking
methods in Git's development.

This patch replaces old 'test -d' and 'test -f' methods with them.

Signed-off-by: Derick W. de M. Frias <derick.william.moraes@gmail.com>
---
 t/t0200-gettext-basic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh
index 8853d8afb9..89d0899a5b 100755
--- a/t/t0200-gettext-basic.sh
+++ b/t/t0200-gettext-basic.sh
@@ -31,12 +31,12 @@ test_expect_success 'xgettext sanity: Comment extraction with --add-comments sto
 '
 
 test_expect_success GETTEXT 'sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease' '
-    test -d "$TEXTDOMAINDIR" &&
+    test_path_is_dir "$TEXTDOMAINDIR" &&
     test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
 '
 
 test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '
-    test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
+    test_path_is_file "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
 '
 
 # TODO: When we have more locales, generalize this to test them
-- 
2.49.0.634.g8613c2bb6c.dirty


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

end of thread, other threads:[~2025-06-18 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03  5:20 [PATCH] t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file' Derick W. de M. Frias
2025-06-03  6:16 ` Patrick Steinhardt
2025-06-18 18:31   ` [PATCH v2] " Derick W. de M. Frias

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).