Re: [PATCH] tests: use test_cmp instead of piping to diff(1)
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 14, 2010, 01:45 UTC
- Message-ID
- <AANLkTinGt6d8tKh8yOT0SJpcgsv+KgrE4jPT2_RgGzeG@mail.gmail.com>
- In-Reply-To
- <7vy6b59q5a.fsf@alter.siamese.dyndns.org>
On Mon, Sep 13, 2010 at 23:31, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Æ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.