From: Junio C Hamano <gitster@pobox.com>
To: Todd Zullinger <tmz@pobox.com>
Cc: git@vger.kernel.org, "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH 01/34] t0450: *.txt -> *.adoc fixes
Date: Mon, 03 Mar 2025 13:52:15 -0800 [thread overview]
Message-ID: <xmqqo6yhvl2o.fsf@gitster.g> (raw)
In-Reply-To: <20250303204443.360595-2-tmz@pobox.com> (Todd Zullinger's message of "Mon, 3 Mar 2025 15:43:59 -0500")
Todd Zullinger <tmz@pobox.com> writes:
> After 1f010d6bdf (doc: use .adoc extension for AsciiDoc files,
> 2025-01-20), we no longer matched any files in this test. The result is
> that we did not test for mismatches in the documentation and --help
> output.
>
> Adjust the test to look at the renamed *.adoc files.
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
> t/t0450-txt-doc-vs-help.sh | 50 +++++++++----------
> ...t-help-mismatches => adoc-help-mismatches} | 0
> 2 files changed, 25 insertions(+), 25 deletions(-)
> rename t/t0450/{txt-help-mismatches => adoc-help-mismatches} (100%)
Wow, good find. This is especially bad and I am glad we caught it
before -rc1 (the hope was that all of these should have been caught
while the topic was in 'next', which was the whole point of cooking
it longer in 'next' than usual, but that plan did not really work).
> diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
> index 853101b86e..2f7504ae7e 100755
> --- a/t/t0450-txt-doc-vs-help.sh
> +++ b/t/t0450-txt-doc-vs-help.sh
> @@ -1,6 +1,6 @@
> #!/bin/sh
>
> -test_description='assert (unbuilt) Documentation/*.txt and -h output
> +test_description='assert (unbuilt) Documentation/*.adoc and -h output
>
> Run this with --debug to see a summary of where we still fail to make
> the two versions consistent with one another.'
> @@ -11,11 +11,11 @@ test_expect_success 'setup: list of builtins' '
> git --list-cmds=builtins >builtins
> '
>
> -test_expect_success 'list of txt and help mismatches is sorted' '
> - sort -u "$TEST_DIRECTORY"/t0450/txt-help-mismatches >expect &&
> - if ! test_cmp expect "$TEST_DIRECTORY"/t0450/txt-help-mismatches
> +test_expect_success 'list of adoc and help mismatches is sorted' '
> + sort -u "$TEST_DIRECTORY"/t0450/adoc-help-mismatches >expect &&
> + if ! test_cmp expect "$TEST_DIRECTORY"/t0450/adoc-help-mismatches
> then
> - BUG "please keep the list of txt and help mismatches sorted"
> + BUG "please keep the list of adoc and help mismatches sorted"
> fi
> '
>
> @@ -40,20 +40,20 @@ help_to_synopsis () {
> echo "$out"
> }
>
> -builtin_to_txt () {
> - echo "$GIT_BUILD_DIR/Documentation/git-$1.txt"
> +builtin_to_adoc () {
> + echo "$GIT_BUILD_DIR/Documentation/git-$1.adoc"
> }
>
> -txt_to_synopsis () {
> +adoc_to_synopsis () {
> builtin="$1" &&
> out_dir="out/$builtin" &&
> - out="$out_dir/txt.synopsis" &&
> + out="$out_dir/adoc.synopsis" &&
> if test -f "$out"
> then
> echo "$out" &&
> return 0
> fi &&
> - b2t="$(builtin_to_txt "$builtin")" &&
> + b2t="$(builtin_to_adoc "$builtin")" &&
> sed -n \
> -E '/^\[(verse|synopsis)\]$/,/^$/ {
> /^$/d;
> @@ -109,29 +109,29 @@ do
> fi
> '
>
> - txt="$(builtin_to_txt "$builtin")" &&
> - preq="$(echo BUILTIN_TXT_$builtin | tr '[:lower:]-' '[:upper:]_')" &&
> + adoc="$(builtin_to_adoc "$builtin")" &&
> + preq="$(echo BUILTIN_ADOC_$builtin | tr '[:lower:]-' '[:upper:]_')" &&
>
> - if test -f "$txt"
> + if test -f "$adoc"
> then
> test_set_prereq "$preq"
> fi &&
>
> - # *.txt output assertions
> - test_expect_success "$preq" "$builtin *.txt SYNOPSIS has dashed labels" '
> - check_dashed_labels "$(txt_to_synopsis "$builtin")"
> + # *.adoc output assertions
> + test_expect_success "$preq" "$builtin *.adoc SYNOPSIS has dashed labels" '
> + check_dashed_labels "$(adoc_to_synopsis "$builtin")"
> '
>
> - # *.txt output consistency assertions
> + # *.adoc output consistency assertions
> result=
> - if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/txt-help-mismatches
> + if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-help-mismatches
> then
> result=failure
> else
> result=success
> fi &&
> test_expect_$result "$preq" "$builtin -h output and SYNOPSIS agree" '
> - t2s="$(txt_to_synopsis "$builtin")" &&
> + t2s="$(adoc_to_synopsis "$builtin")" &&
> if test "$builtin" = "merge-tree"
> then
> test_when_finished "rm -f t2s.new" &&
> @@ -140,17 +140,17 @@ do
> fi &&
> h2s="$(help_to_synopsis "$builtin")" &&
>
> - # The *.txt and -h use different spacing for the
> + # The *.adoc and -h use different spacing for the
> # alignment of continued usage output, normalize it.
> - align_after_nl "$builtin" <"$t2s" >txt &&
> + align_after_nl "$builtin" <"$t2s" >adoc &&
> align_after_nl "$builtin" <"$h2s" >help &&
> - test_cmp txt help
> + test_cmp adoc help
> '
>
> - if test_have_prereq "$preq" && test -e txt && test -e help
> + if test_have_prereq "$preq" && test -e adoc && test -e help
> then
> test_debug '
> - if test_cmp txt help >cmp 2>/dev/null
> + if test_cmp adoc help >cmp 2>/dev/null
> then
> echo "=== DONE: $builtin ==="
> else
> @@ -161,7 +161,7 @@ do
>
> # Not in test_expect_success in case --run is being
> # used with --debug
> - rm -f txt help tmp 2>/dev/null
> + rm -f adoc help tmp 2>/dev/null
> fi
> done <builtins
>
> diff --git a/t/t0450/txt-help-mismatches b/t/t0450/adoc-help-mismatches
> similarity index 100%
> rename from t/t0450/txt-help-mismatches
> rename to t/t0450/adoc-help-mismatches
next prev parent reply other threads:[~2025-03-03 21:52 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 20:43 [PATCH 00/34] misc *.txt -> *.adoc fixes Todd Zullinger
2025-03-03 20:43 ` [PATCH 01/34] t0450: " Todd Zullinger
2025-03-03 21:52 ` Junio C Hamano [this message]
2025-03-03 22:28 ` Todd Zullinger
2025-03-03 22:55 ` Junio C Hamano
2025-03-04 0:15 ` Todd Zullinger
2025-03-03 20:44 ` [PATCH 02/34] .gitattributes: more *.txt -> *.adoc updates Todd Zullinger
2025-03-03 20:44 ` [PATCH 03/34] doc: remove unneeded .gitattributes Todd Zullinger
2025-03-03 21:55 ` Junio C Hamano
2025-03-03 20:44 ` [PATCH 04/34] Makefile: update reference to technical/racy-git.adoc Todd Zullinger
2025-03-03 20:44 ` [PATCH 05/34] README: *.txt -> *.adoc fixes Todd Zullinger
2025-03-03 20:44 ` [PATCH 06/34] CodingGuidelines: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 07/34] MyFirstContribution: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 08/34] MyFirstObjectWalk: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 09/34] howto/new-command: update reference to builtin docs Todd Zullinger
2025-03-03 21:59 ` Junio C Hamano
2025-03-03 20:44 ` [PATCH 10/34] technical/partial-clone: update reference to rev-list-options.adoc Todd Zullinger
2025-03-03 20:44 ` [PATCH 11/34] doc: *.txt -> *.adoc fixes Todd Zullinger
2025-03-03 20:44 ` [PATCH 12/34] advice.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 13/34] apply.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 14/34] builtin.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 15/34] config.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 16/34] contrib/long-running-filter: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 17/34] diff.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 18/34] diffcore.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 19/34] fsck.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 20/34] list-objects-filter-options.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 21/34] object-name.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 22/34] parse-options.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 23/34] pseudo-merge.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 24/34] refs.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 25/34] setup.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 26/34] simple-ipc.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 27/34] t/helper/test-rot13-filter.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 28/34] t6012: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 29/34] t6434: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 30/34] trace2.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 31/34] trace2/tr2_sysenv.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 32/34] transport.h: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 33/34] unpack-trees.c: " Todd Zullinger
2025-03-03 20:44 ` [PATCH 34/34] xdiff: " Todd Zullinger
2025-03-03 23:46 ` [PATCH 00/34] misc " brian m. carlson
2025-03-03 23:48 ` 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=xmqqo6yhvl2o.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=tmz@pobox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).