Git development
 help / color / mirror / Atom feed
* [PATCH] t2030: modernize test path checks
@ 2026-10-14 11:52 Srujith A Poojary via GitGitGadget
  0 siblings, 0 replies; only message in thread
From: Srujith A Poojary via GitGitGadget @ 2026-10-14 11:52 UTC (permalink / raw)
  To: git; +Cc: Srujith A Poojary, Srujith Poojary

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-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2256/poojarysrujith/microproject-modernize-path-check-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2256

 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-14 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 11:52 [PATCH] t2030: modernize test path checks Srujith A Poojary via GitGitGadget

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