All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michael Blume <blume.mike@gmail.com>
Cc: Git List <git@vger.kernel.org>, Luis Henriques <henrix@camandro.org>
Subject: Re: no-xmailer tests fail under Mac OS
Date: Sat, 6 Dec 2014 01:32:46 -0500	[thread overview]
Message-ID: <20141206063245.GA5966@peff.net> (raw)
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:

> > 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

  reply	other threads:[~2014-12-06  6:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-06  2:05 no-xmailer tests fail under Mac OS Michael Blume
2014-12-06  5:34 ` Jeff King
2014-12-06  6:27   ` Michael Blume
2014-12-06  6:32     ` Jeff King [this message]
     [not found]       ` <CAO2U3QgDMpKwqsjzPNECpJw4z+WbboX5ug7Shu5v5ZCuPsKuGQ@mail.gmail.com>
2014-12-06  7:12         ` Jeff King
2014-12-11 22:11           ` Junio C Hamano
2014-12-11 22:13             ` Jeff King
2014-12-11 22:35               ` Luis Henriques
2014-12-09 19:45 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141206063245.GA5966@peff.net \
    --to=peff@peff.net \
    --cc=blume.mike@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=henrix@camandro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.