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

Re: t3032 incompatible with Cygwin/Windows

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jul 18, 2013, 19:11 UTC
Message-ID
<51E83DD1.8010109@ramsay1.demon.co.uk>
In-Reply-To
<51E591FF.7030600@gmail.com>
Mark Levedahl wrote:
Show 14 quoted lines
> Subtests 6,7, and 9 of t3032 fail on Cygwin, and I presume will fail on 
> msysgit for similar reasons. Looking at test 6, the expected result is a 
> line ending with \r\n in text.txt. This line is extracted with grep 
> (grep 'justice and holiness' text.txt > actual), with unavoidable result 
> that on Cygwin the line ending is \n. This happens because on Cygwin, 
> the text utils are compiled to open files in text mode meaning than \n 
> and \r\n are both recognized as EOL markers. Thus, even though text.txt 
> is an exact match for what is created on Linux, the test fails because 
> \r\n cannot be distinguished by the available tools.
> 
> I'm not sure the right way forward. I did confirm that by substituting 
> "q_to_tab" for "q_to_cr" in t3032, the test pass on Cygwin and on Linux. 
> Perhaps t3032 should be so amended to avoid use of a non-portable line 
> ending construct?
This passes for me, on both cygwin and MinGW.
After adding a test_pause to test #6:
$ ./t3032-merge-recursive-options.sh -v
...
expecting success:
        q_to_cr <<-\EOF >expected &&
            justice and holiness and is the nurse of his age and theQ
        EOF
        git read-tree --reset -u HEAD &&
        git merge-recursive --ignore-space-change HEAD^ -- HEAD remote &&
        grep "justice and holiness" text.txt >actual &&
        test_cmp expected actual &&
        test_pause

Merging HEAD with remote Merging: 0ab7224 Clarify be82dcf Remove cruft found 1 common ancestor: c1e95d9 Initial revision Auto-merging text.txt $ xxd expected 0000000: 2020 2020 6a75 7374 6963 6520 616e 6420 justice and 0000010: 686f 6c69 6e65 7373 2061 6e64 2069 7320 holiness and is 0000020: 7468 6520 6e75 7273 6520 6f66 2068 6973 the nurse of his 0000030: 2061 6765 2061 6e64 2074 6865 0d0a age and the.. $ xxd actual 0000000: 2020 2020 6a75 7374 6963 6520 616e 6420 justice and 0000010: 686f 6c69 6e65 7373 2061 6e64 2069 7320 holiness and is 0000020: 7468 6520 6e75 7273 6520 6f66 2068 6973 the nurse of his 0000030: 2061 6765 2061 6e64 2074 6865 0d0a age and the.. $ grep "justice and holiness" text.txt | xxd 0000000: 2020 2020 6a75 7374 6963 6520 616e 6420 justice and 0000010: 686f 6c69 6e65 7373 2061 6e64 2069 7320 holiness and is 0000020: 7468 6520 6e75 7273 6520 6f66 2068 6973 the nurse of his 0000030: 2061 6765 2061 6e64 2074 6865 0d0a age and the.. $ exit

...

# passed all 11 test(s) 1..11 $

ATB, Ramsay Jones

Previous: Jonathan Nieder
Message 14 of 14 in “t3032 incompatible with Cygwin/Windows”
  1. Mark LevedahlJul 16, 2013
  2. t3032 - make compatible with systems using \r\n as a line endingMark Levedahl, Jul 16, 2013
  3. Jonathan NiederJul 16, 2013
  4. Mark LevedahlJul 16, 2013
  5. t3032 - make compatible with systems using \r\n as a line endingMark Levedahl, Jul 16, 2013
  6. t3032 - make compatible with systems using \r\n as a line endingMark Levedahl, Jul 16, 2013
  7. Junio C HamanoJul 17, 2013
  8. test-lib.sh - define and use GREP_STRIPS_CRMark Levedahl, Jul 18, 2013
  9. Ramsay JonesJul 20, 2013
  10. Junio C HamanoJul 21, 2013
  11. Ramsay JonesJul 18, 2013
  12. Mark LevedahlJul 18, 2013
  13. Jonathan NiederJul 16, 2013
  14. Ramsay JonesJul 18, 2013

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.