git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 13, 2010, 23:31 UTC
Message-ID
<7vy6b59q5a.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1284411582-1088-1-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 10 quoted lines
> @@ -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?

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 5 in “tests: use test_cmp instead of piping to diff(1)”
  1. tests: use test_cmp instead of piping to diff(1)Ævar Arnfjörð Bjarmason, Sep 13, 2010
  2. Junio C HamanoSep 13, 2010
  3. Ævar Arnfjörð BjarmasonSep 14, 2010
  4. Jens LehmannSep 14, 2010
  5. Ævar Arnfjörð BjarmasonSep 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.