From: "Derick W. de M. Frias" <derick.william.moraes@gmail.com>
To: ps@pks.im
Cc: derick.william.moraes@gmail.com, git@vger.kernel.org
Subject: [PATCH v2] t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file'
Date: Wed, 18 Jun 2025 15:31:10 -0300 [thread overview]
Message-ID: <20250618183754.108821-1-derick.william.moraes@gmail.com> (raw)
In-Reply-To: <aD6TJLuuaZmiFUvZ@pks.im>
Thanks for your feedback Patrick. I'm resending the patch with your
suggestions.
'test_path_is_file' and 'test_path_is_dir' are modern debbuging-friendly
path checking methods in Git's development that output useful messages
when the test fails, unlike 'test -f' and 'test -d' that don't provide
feedback.
Replace 'test -d' and 'test -f' methods with 'test_path_is_dir' and
'test_path_is_file'.
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.50.0.rc0.62.g658f0ae201.dirty
prev parent reply other threads:[~2025-06-18 18:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Derick W. de M. Frias [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250618183754.108821-1-derick.william.moraes@gmail.com \
--to=derick.william.moraes@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).