From: Junio C Hamano <gitster@pobox.com>
To: Dragan Simic <dsimic@manjaro.org>
Cc: git@vger.kernel.org, rsbecker@nexbridge.com, github@seichter.de
Subject: Re: [PATCH 3/3] t1300: add tests for internal whitespace and inline comments
Date: Wed, 13 Mar 2024 19:18:58 -0700 [thread overview]
Message-ID: <xmqq8r2l1rot.fsf@gitster.g> (raw)
In-Reply-To: <292ab942c38de44476c6c5bf045c375bf4f6a70d.1710258538.git.dsimic@manjaro.org> (Dragan Simic's message of "Tue, 12 Mar 2024 16:55:46 +0100")
Dragan Simic <dsimic@manjaro.org> writes:
> Add a couple of additional automated tests, to improve the coverage of
> configuration file entries whose values contain internal whitespace, or have
> an additional inline comment.
While this may document the current behaviour, I am not sure of the
value of carving the current behaviour in stone, especially after
checking if the current behaviour is a bug.
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
> t/t1300-config.sh | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/t/t1300-config.sh b/t/t1300-config.sh
> index 31c387868708..589af5e81d61 100755
> --- a/t/t1300-config.sh
> +++ b/t/t1300-config.sh
> @@ -11,6 +11,26 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
> TEST_PASSES_SANITIZE_LEAK=true
> . ./test-lib.sh
>
> +cat > .git/config << EOF
> +[section]
> + sparse = big blue
> + annotated = big blue # to be discarded
> +EOF
> +
> +echo 'big blue' > expect
> +
> +test_expect_success 'internal whitespace' '
> + git config --get section.sparse > output &&
> + test_cmp expect output
> +'
> +
> +echo 'big blue' > expect
> +
> +test_expect_success 'inline comment' '
> + git config --get section.annotated > output &&
> + test_cmp expect output
> +'
> +
> test_expect_success 'clear default config' '
> rm -f .git/config
> '
next prev parent reply other threads:[~2024-03-14 2:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 15:55 [PATCH 0/3] Improve the documentation and test coverage for whitespace and comments Dragan Simic
2024-03-12 15:55 ` [PATCH 1/3] config.txt: describe whitespace characters further and more accurately Dragan Simic
2024-03-14 1:18 ` Junio C Hamano
2024-03-14 6:20 ` Dragan Simic
2024-03-14 16:45 ` Junio C Hamano
2024-03-14 18:48 ` Dragan Simic
2024-03-12 15:55 ` [PATCH 2/3] config.txt: perform some minor reformatting Dragan Simic
2024-03-14 1:58 ` Junio C Hamano
2024-03-14 6:20 ` Dragan Simic
2024-03-14 16:22 ` Junio C Hamano
2024-03-14 18:40 ` Dragan Simic
2024-03-12 15:55 ` [PATCH 3/3] t1300: add tests for internal whitespace and inline comments Dragan Simic
2024-03-14 2:18 ` Junio C Hamano [this message]
2024-03-14 6:20 ` Dragan Simic
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=xmqq8r2l1rot.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=dsimic@manjaro.org \
--cc=git@vger.kernel.org \
--cc=github@seichter.de \
--cc=rsbecker@nexbridge.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 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.