Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: no-xmailer tests fail under Mac OS

From: Jeff King <hidden>
Date: 2016-06-15 23:03:13

On Fri, Dec 05, 2014 at 10:27:40PM -0800, Michael Blume wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help