From: Junio C Hamano Date: Sat, 02 Jan 2016 19:35:26 GMT Subject: Re: t6023 broken under Mac OS Message-ID: In-Reply-To: <5686B400.7000800@ramsayjones.plus.com> Ramsay Jones writes: > Hmm, I have never used a Mac, so I'm just guessing here, but > you could try something like (obviously untested!): > > diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh > index 245359a..68b306f 100755 > --- a/t/t6023-merge-file.sh > +++ b/t/t6023-merge-file.sh > @@ -350,7 +350,7 @@ test_expect_success 'conflict at EOF without LF resolved by --union' \ > test_expect_success 'conflict markers contain CRLF when core.eol=crlf' ' > test_must_fail git -c core.eol=crlf merge-file -p \ > nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt && > - test $(sed -n "/\.txt\r$/p" output.txt | wc -l) = 3 > + test $(tr "\015" Q ' > > test_done > > [The 'wc -l' portability should only be a problem if you rely on the > exact textual form of the output, rather than the integer count. > 'wc -l' is used in many many tests ...] Looks OK, thanks. The use of the unportable '\r' with sed exists only in a stale topic parked on 'pu', so I won't worry about it myself at this point, but when the topic is rerolled, reviewers please be careful to spot it and stop it from introducing this bug to our tree. Thanks.