public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pushkar Singh <pushkarkumarsingh1970@gmail•com>
To: git@vger•kernel.org
Subject: [PATCH v3] t1300: use test helpers instead of test builtins
Date: Sun,  4 Jan 2026 12:41:53 +0000	[thread overview]
Message-ID: <20260104124255.15609-1-pushkarkumarsingh1970@gmail.com> (raw)
In-Reply-To: <20260102062029.18210-1-pushkarkumarsingh1970@gmail.com>

This version updates the commit message to avoid calling `test` a shell
primitive, as suggested.

Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail•com>
---
 t/t1300-config.sh             | 8 ++++----
 t/t2021-checkout-overwrite.sh | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 358d636379..9850fcd5b5 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -1232,12 +1232,12 @@ test_expect_success SYMLINKS 'symlinked configuration' '
 	test_when_finished "rm myconfig" &&
 	ln -s notyet myconfig &&
 	git config --file=myconfig test.frotz nitfol &&
-	test -h myconfig &&
-	test -f notyet &&
+	test_path_is_symlink myconfig &&
+	test_path_is_file notyet &&
 	test "z$(git config --file=notyet test.frotz)" = znitfol &&
 	git config --file=myconfig test.xyzzy rezrov &&
-	test -h myconfig &&
-	test -f notyet &&
+	test_path_is_symlink myconfig &&
+	test_path_is_file notyet &&
 	cat >expect <<-\EOF &&
 	nitfol
 	rezrov
diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.sh
index a5c03d5d4a..38c41ae373 100755
--- a/t/t2021-checkout-overwrite.sh
+++ b/t/t2021-checkout-overwrite.sh
@@ -27,7 +27,7 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
 	git rm --cached a/b &&
 	git commit -m "un-track the file" &&
 	test_must_fail git checkout start &&
-	test -f a/b
+	test_path_is_file a/b
 '
 
 test_expect_success 'create a commit where dir a/b changed to symlink' '
@@ -49,7 +49,7 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
 
 test_expect_success SYMLINKS 'the symlink remained' '
 
-	test -h a/b
+	test_path_is_symlink a/b
 '
 
 test_expect_success 'cleanup after previous symlink tests' '
-- 
2.43.0


  parent reply	other threads:[~2026-01-04 12:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-02  6:20 [PATCH] t1300: use test helpers instead of shell primitives pushkarkumarsingh1970
2026-01-02  9:09 ` Karthik Nayak
2026-01-02  9:39   ` Pushkar Singh
2026-01-04  2:39 ` Junio C Hamano
2026-01-04 12:41 ` Pushkar Singh [this message]
2026-01-04 15:34   ` [PATCH v3] t1300: use test helpers instead of test builtins Abraham Samuel Adekunle
2026-01-04 19:40     ` Pushkar Singh
2026-01-05 10:55       ` Karthik Nayak
2026-01-05 14:13         ` Samuel Abraham
2026-01-04 19:47   ` [PATCH v4] " Pushkar Singh
2026-01-05 10:55     ` Karthik Nayak

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=20260104124255.15609-1-pushkarkumarsingh1970@gmail.com \
    --to=pushkarkumarsingh1970@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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