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

Re: no-xmailer tests fail under Mac OS

From
Jeff King <peff@peff.net>
Date
Dec 6, 2014, 06:32 UTC
Message-ID
<20141206063245.GA5966@peff.net>
In-Reply-To
<CAO2U3QjkJRPrFvapK=LDU_GG5Ne6_zVD+S61JP+iV_Xi-gk5JQ@mail.gmail.com>
On Fri, Dec 05, 2014 at 10:27:40PM -0800, Michael Blume wrote:
Show 16 quoted lines
> > We have had trouble in the past with "wc -l" output not being strictly
> > portable. I do not recall offhand which systems, but it is a good bet
> > that this is the culprit. Doing:
> >
> >   grep ^X-Mailer: out >mailer &&
> >   test_line_count = $expected mailer
> >
> > should fix it. It might be even nicer to actually compare the x-mailer
> > line we find to an expected output, but that may introduce complications
> > if the value changes with the version or something (you'd have to
> > sanitize the output, and then I do not know that the test is really
> > buying much over just seeing whether it exists).
> >
> > -Peff
> 
> Actually need to drop the '&&', but yes, that works perfectly, thanks =)

Ah, right, we might be looking for 0 sometimes. The right way to do it without destroying the &&-chaining is:

  { grep ^X-Mailer: out || true } &&
  test_line_count = $expected mailer
-Peff
Previous: Michael BlumeNext: Junio C Hamano
Message 4 of 9 in “no-xmailer tests fail under Mac OS”
  1. Michael BlumeDec 6, 2014
  2. Jeff KingDec 6, 2014
  3. Michael BlumeDec 6, 2014
  4. Jeff KingDec 6, 2014
  5. Junio C HamanoDec 9, 2014
  6. Jeff KingDec 6, 2014
  7. Junio C HamanoDec 11, 2014
  8. Jeff KingDec 11, 2014
  9. Luis HenriquesDec 11, 2014

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.