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

Re: [PATCH v2 1/2] test-lib: add a function to compare an expection with stdout from a command

From
Johannes Sixt <j6t@kdbg.org>
Date
Apr 17, 2016, 15:19 UTC
Message-ID
<5713A979.6030404@kdbg.org>
In-Reply-To
<CAPig+cSOuFygsScGn_Nu0_d8mvRik1hQJuanrb-Nvw3ozyt7JQ@mail.gmail.com>
Am 17.04.2016 um 05:07 schrieb Eric Sunshine:
> Hmm, considering that $(...) collapses each whitespace run (including
> newlines) down to a single space, I don't see how you could get a
> multi-line result.
No, it doesn't. It only removes trailing newlines:

~:1004> frotz=$(echo 1; echo; echo 2; echo; echo; echo); echo "$frotz" 1

2 ~:1005>

-- Hannes
Previous: Jeff KingNext: Eric Sunshine
Message 7 of 13 in “t1500-rev-parse: re-write t1500”
  1. 0/2 t1500-rev-parse: re-write t1500Michael Rappazzo, Apr 16, 2016
  2. 1/2 test-lib: add a function to compare an expection with stdout from a commandMichael Rappazzo, Apr 16, 2016
  3. Eric SunshineApr 17, 2016
  4. Jeff KingApr 17, 2016
  5. Eric SunshineApr 17, 2016
  6. Jeff KingApr 17, 2016
  7. Johannes SixtApr 17, 2016
  8. Eric SunshineApr 17, 2016
  9. 2/2 t1500-rev-parse: rewrite each test to run in isolationMichael Rappazzo, Apr 16, 2016
  10. Eric SunshineApr 17, 2016
  11. Johannes SixtApr 17, 2016
  12. SZEDER GáborApr 17, 2016
  13. Eric SunshineApr 17, 2016

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.