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

Re: no-xmailer tests fail under Mac OS

From: Michael Blume <hidden>
Date: 2016-06-15 23:03:13

On Fri, Dec 5, 2014 at 9:34 PM, Jeff King [off-list ref] wrote:
On Fri, Dec 05, 2014 at 06:05:24PM -0800, Michael Blume wrote:
quoted
Failures start from

commit d2384abff7a6181fd7b9a51af7e780aa21e5cb8d (refs/bisect/bad)
Author: Luis Henriques [off-list ref]
Date:   Thu Dec 4 19:11:30 2014 +0000

    test/send-email: --[no-]xmailer tests

    Add tests for the --[no-]xmailer option.

    Signed-off-by: Luis Henriques [off-list ref]
    Signed-off-by: Junio C Hamano [off-list ref]

but continue with Junio's SQUASH??? commit at b728d078
The commit contains:

  +       test "z$(grep ^X-Mailer: out | wc -l)" = "z$expected"

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 =)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help