From: Junio C Hamano <gitster@pobox.com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de,
Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH] add: check color.ui for interactive add
Date: Tue, 06 Jun 2023 10:05:25 +0900 [thread overview]
Message-ID: <xmqqo7lt4cyy.fsf@gitster.g> (raw)
In-Reply-To: <xmqqsfb54d4u.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 06 Jun 2023 10:01:53 +0900")
Junio C Hamano <gitster@pobox.com> writes:
>> + test_decode_color <actual.raw >actual &&
>
> It is a minor thing, but for expected output that _wants_ to be
> indented in a non-standard way, it would be prudent to protect the
> lines from "git apply --whitespace=fix" and in-transit corruption,
> perhaps doing something like ...
>
>> + cat >expect <<-\EOF &&
>> + staged unstaged path
>> + 1: +3/-0 +2/-1 color-test
>> +
>> + *** Commands ***
>
> ... this.
>
> sed -e "s/^|//" >expect <<-\EOF &&
> | staged unstaged path
> | 1: +3/-0 +2/-1 color-test
> |
> |*** Commands ***
>
> Although this patch does not add such lines, the same principle
> applies to expected output lines that _wants_ to have trailing
> whitespaces.
Another thing. We are interested in the configuration to disable
color, so instead of spelling out exact output we expect, which is
brittle when we anticipate that the contents used for the test may
change, wouldn't it work better to ensure that actual.raw and actual
are identical?
next prev parent reply other threads:[~2023-06-06 1:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 19:42 [PATCH] add: check color.ui for interactive add Derrick Stolee via GitGitGadget
2023-06-06 1:01 ` Junio C Hamano
2023-06-06 1:05 ` Junio C Hamano [this message]
2023-06-06 2:13 ` Jeff King
2023-06-06 13:32 ` Derrick Stolee
2023-06-06 14:20 ` [PATCH v2] " Derrick Stolee via GitGitGadget
2023-06-07 11:09 ` Phillip Wood
2023-06-07 13:33 ` Derrick Stolee
2023-06-12 17:09 ` Junio C Hamano
2023-06-07 13:44 ` [Patch v2 2/2] add: test use of brackets when color is disabled Derrick Stolee
2023-06-07 15:31 ` Phillip Wood
2023-06-12 17:13 ` 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=xmqqo7lt4cyy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
/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).