All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Muhammed Dilshad A <dilsheddilu123@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t0450: use test_path_is_file and test_path_is_missing
Date: Tue, 6 Oct 2026 14:23:55 +0200	[thread overview]
Message-ID: <asToW_aXYGCg0xuv@pks.im> (raw)
In-Reply-To: <20261006101458.604775-1-dilsheddilu123@gmail.com>

On Tue, Oct 06, 2026 at 03:44:58PM +0530, Muhammed Dilshad A wrote:
> Replace raw 'test -f' and '! test -f' assertions with the test helper
> functions 'test_path_is_file' and 'test_path_is_missing' to provide
> diagnostic output when an assertion fails.
> 
> Signed-off-by: Muhammed Dilshad A <dilsheddilu123@gmail.com>

Good commit message, pinpointing exactly why we even bother to do this
change.

> diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
> index 55c0fb3cb7..a2da2b0192 100755
> --- a/t/t0450-txt-doc-vs-help.sh
> +++ b/t/t0450-txt-doc-vs-help.sh
> @@ -116,13 +116,13 @@ do
>  	if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing
>  	then
>  		test_expect_success "$builtin appropriately marked as not having .adoc" '
> -			! test -f "$adoc"
> +			test_path_is_missing "$adoc"
>  		'
>  	else
>  		test_set_prereq "$preq"
>  
>  		test_expect_success "$builtin appropriately marked as having .adoc" '
> -			test -f "$adoc"
> +			test_path_is_file "$adoc"
>  		'
>  	fi

And the change looks obviously good to me, as well. Thanks!

Patrick

      reply	other threads:[~2026-10-06 12:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 10:14 [PATCH] t0450: use test_path_is_file and test_path_is_missing Muhammed Dilshad A
2026-10-06 12:23 ` Patrick Steinhardt [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=asToW_aXYGCg0xuv@pks.im \
    --to=ps@pks.im \
    --cc=dilsheddilu123@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.