All of lore.kernel.org
 help / color / mirror / Atom feed
From: ambar chakravartty <amch9605@gmail.com>
To: git@vger.kernel.org
Cc: ambar chakravartty <chakravarttyambar@gmail.com>,
	ambar chakravartty <amch9605@gmail.com>
Subject: [PATCH 1/1] t5401: prefer test_path_is_* helper function
Date: Sat,  1 Feb 2025 12:42:10 +0530	[thread overview]
Message-ID: <20250201071210.30509-1-amch9605@gmail.com> (raw)

From: ambar chakravartty <chakravarttyambar@gmail.com>

    test -f does not provide a nice error message when we hit test
    failures, so use test_path_is_file instead

Signed-off-by: ambar chakravartty <amch9605@gmail.com>
---
 t/t5401-update-hooks.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 723d1e17ec..17a46fd3ba 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '
 '
 
 test_expect_success 'hooks ran' '
-	test -f victim.git/pre-receive.args &&
-	test -f victim.git/pre-receive.stdin &&
-	test -f victim.git/update.args &&
-	test -f victim.git/update.stdin &&
-	test -f victim.git/post-receive.args &&
-	test -f victim.git/post-receive.stdin &&
-	test -f victim.git/post-update.args &&
-	test -f victim.git/post-update.stdin
+	test_path_is_file victim.git/pre-receive.args &&
+	test_path_is_file victim.git/pre-receive.stdin &&
+	test_path_is_file victim.git/update.args &&
+	test_path_is_file victim.git/update.stdin &&
+	test_path_is_file victim.git/post-receive.args &&
+	test_path_is_file victim.git/post-receive.stdin &&
+	test_path_is_file victim.git/post-update.args &&
+	test_path_is_file victim.git/post-update.stdin
 '
 
 test_expect_success 'pre-receive hook input' '
-- 
2.48.1


             reply	other threads:[~2025-02-01  7:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-01  7:12 ambar chakravartty [this message]
2025-02-01  9:32 ` [PATCH 1/1] t5401: prefer test_path_is_* helper function Meet Soni
2025-02-01 13:29   ` ambar
2025-02-02 23:43 ` Junio C Hamano

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=20250201071210.30509-1-amch9605@gmail.com \
    --to=amch9605@gmail.com \
    --cc=chakravarttyambar@gmail.com \
    --cc=git@vger.kernel.org \
    /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.