git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t0450: use test_path_is_file and test_path_is_missing

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 6, 2026, 12:23 UTC
Message-ID
<asToW_aXYGCg0xuv@pks.im>
In-Reply-To
<20261006101458.604775-1-dilsheddilu123@gmail.com>
On Tue, Oct 06, 2026 at 03:44:58PM +0530, Muhammed Dilshad A wrote:
Show 5 quoted lines
> 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.

Show 19 quoted lines
> 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
Previous: Muhammed Dilshad A
Message 2 of 2 in “t0450: use test_path_is_file and test_path_is_missing”
  1. t0450: use test_path_is_file and test_path_is_missingMuhammed Dilshad A, Oct 6, 2026
  2. Patrick SteinhardtOct 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.