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

Re: t6023 broken under Mac OS

From
Beat Bolli <dev+git@drbeat.li>
Date
Jan 2, 2016, 20:06 UTC
Message-ID
<56882DDF.2030701@drbeat.li>
In-Reply-To
<xmqqr3hzpyf5.fsf@gitster.mtv.corp.google.com>
On 02.01.16 20:35, Junio C Hamano wrote:
Show 29 quoted lines
> Ramsay Jones <ramsay@ramsayjones.plus.com> 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 <output.txt | sed -n "/\.txtQ$/p" | wc -l) -eq 3
>>  '
>>  
>>  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.
I'll amend this topic once I find some time again...
Thanks.
Previous: Junio C Hamano
Message 7 of 7 in “t6023 broken under Mac OS”
  1. Torsten BögershausenJan 1, 2016
  2. Ramsay JonesJan 1, 2016
  3. Torsten BögershausenJan 1, 2016
  4. Ramsay JonesJan 1, 2016
  5. Torsten BögershausenJan 1, 2016
  6. Junio C HamanoJan 2, 2016
  7. Beat BolliJan 2, 2016

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.