Re: [PATCH] tests: use test_cmp instead of piping to diff(1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 14.09.2010 03:45, schrieb Ævar Arnfjörð Bjarmason:
> On Mon, Sep 13, 2010 at 23:31, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 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@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]