From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] tests: use test_cmp instead of piping to diff(1)
Date: Wed, 15 Sep 2010 23:15:36 +0000 [thread overview]
Message-ID: <AANLkTimpV20yGKw57raxho-8zSymLEvXgXSAayEmb7M9@mail.gmail.com> (raw)
In-Reply-To: <4C90029F.6020909@web.de>
On Tue, Sep 14, 2010 at 23:17, Jens Lehmann <Jens.Lehmann@web.de> wrote:
> Am 14.09.2010 03:45, schrieb Ævar Arnfjörð Bjarmason:
>> On Mon, Sep 13, 2010 at 23:31, Junio C Hamano <gitster@pobox.com> wrote:
>>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>>
>>>> @@ -37,9 +37,10 @@ head1=$(add_file sm1 foo1 foo2)
>>>> test_expect_success 'added submodule' "
>>>> git add sm1 &&
>>>> git diff-index -p --submodule=log HEAD >actual &&
>>>> - diff actual - <<-EOF
>>>> + cat >expected <<-EOF &&
>>>> Submodule sm1 0000000...$head1 (new submodule)
>>>> EOF
>>>> + test_cmp expected actual
>>>> "
>>>
>>> Nit. Did you really mean <<-EOF, not <<EOF, here, especially you are
>>> writing the here document without indentation with any TAB?
>>
>> I just meant to replace the diff invocations with test_cmp. Changing
>> the surrounding here-docs was outside the scope of the patch.
>
> I plead guilty for introducing the "<<-EOF"s in the first place by
> simply copying the frame for this test from t7401. But me too thinks
> the "test_cmp" should have TABs in front of them instead of spaces.
>
> With the "TAB in front of test_cmp" issue fixed you may add:
> Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Junio, since you picked this up as part of the ab/i18n branch I fixed
this issue up there. You can pull it from the usual place
(git://github.com/avar/git.git ab/i18n).
I didn't switch to TAB in all cases, but only the ones where the
surrounding test code already used TAB. t4041-diff-submodule-option.sh
uses TAB for indent, but t7401-submodule-summary.sh does not, this way
my patch retains the indentation of the surrounding code.
(I didn't add Jens's Acked-by to the patch since I didn't strictly do
what he was suggesting).
prev parent reply other threads:[~2010-09-15 23:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 20:59 [PATCH] tests: use test_cmp instead of piping to diff(1) Ævar Arnfjörð Bjarmason
2010-09-13 23:31 ` Junio C Hamano
2010-09-14 1:45 ` Ævar Arnfjörð Bjarmason
2010-09-14 23:17 ` Jens Lehmann
2010-09-15 23:15 ` Ævar Arnfjörð Bjarmason [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=AANLkTimpV20yGKw57raxho-8zSymLEvXgXSAayEmb7M9@mail.gmail.com \
--to=avarab@gmail.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@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).