From: "Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Srujith A Poojary <poojarysrujith@gmail.com>,
Srujith Poojary <poojarysrujith@gmail.com>
Subject: [PATCH v2] [Outreachy PATCH] t2030: modernize test path checks
Date: Fri, 16 Oct 2026 07:25:48 +0000 [thread overview]
Message-ID: <pull.2256.v2.git.1792135548923.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2256.git.1791978767497.gitgitgadget@gmail.com>
From: Srujith Poojary <poojarysrujith@gmail.com>
Replace old-style file checks with test_path_is_file and the helper
test_path_is_missing for clearer failure diagnostics in test output.
Search with: git grep "test -[efd]" t/
Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
---
t2030: modernize test path checks
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2256%2Fpoojarysrujith%2Fmicroproject-modernize-path-check-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2256/poojarysrujith/microproject-modernize-path-check-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2256
Range-diff vs v1:
1: 641b9330c9 ! 1: 93cf6c12f4 t2030: modernize test path checks
@@ Metadata
Author: Srujith Poojary <poojarysrujith@gmail.com>
## Commit message ##
- t2030: modernize test path checks
+ [Outreachy PATCH] t2030: modernize test path checks
Replace old-style file checks with test_path_is_file and the helper
+
test_path_is_missing for clearer failure diagnostics in test output.
Search with: git grep "test -[efd]" t/
t/t2030-unresolve-info.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh
index 9af24b1204..56a7f849d6 100755
--- a/t/t2030-unresolve-info.sh
+++ b/t/t2030-unresolve-info.sh
@@ -170,7 +170,7 @@ test_expect_success 'rerere and rerere forget' '
git rerere &&
rerere_id=$(cd .git/rr-cache && echo */postimage) &&
rerere_id=${rerere_id%/postimage} &&
- test -f .git/rr-cache/$rerere_id/postimage &&
+ test_path_is_file .git/rr-cache/$rerere_id/postimage &&
git checkout -m fi/le &&
echo resurrect the conflict &&
test_grep "^=======" fi/le &&
@@ -182,7 +182,7 @@ test_expect_success 'rerere and rerere forget' '
check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&
test -z "$(git ls-files -u)" &&
git rerere forget fi/le &&
- ! test -f .git/rr-cache/$rerere_id/postimage &&
+ test_path_is_missing .git/rr-cache/$rerere_id/postimage &&
tr "\0" "\n" <.git/MERGE_RR >actual &&
echo "$rerere_id fi/le" >expect &&
test_cmp expect actual
base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
--
gitgitgadget
next prev parent reply other threads:[~2026-10-16 7:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 11:52 [PATCH] t2030: modernize test path checks Srujith A Poojary via GitGitGadget
2026-10-16 7:25 ` Srujith A Poojary via GitGitGadget [this message]
2026-10-16 8:36 ` [PATCH v2] [Outreachy PATCH] " Harald Nordgren
2026-10-16 8:50 ` Srujith Poojary
2026-10-16 9:35 ` Usman Akinyemi
2026-10-16 10:16 ` Srujith Poojary
2026-10-16 9:18 ` Usman Akinyemi
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=pull.2256.v2.git.1792135548923.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=poojarysrujith@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.