> Date: Sat, 3 Oct 2026 18:13:00 +0200 > From: Patrice Dumas <[email protected]> > > The tests fail for msys2 in CI because of CRLF versus LF mainly in > output and sometime in input (and Perl/C differences that could be > overxome if what we want is clear).
Tests shouldn't fail due to end-of-line (EOL) format differences. The easiest way to avoid that is (a) to use Diff instead of cmp to compare output with expected output, and (b) use the --strip-trailing-cr command-line option to Diff. On my system, 'diff' is a shell script that invokes Diff the program with the --strip-trailing-cr option, and because of this tests rarely if ever fail due to EOL format differences > Before turning to tests, I would like that we determine what should be > expected for native Windows texi2any. > > 1) input > > How should CRLF be treated in input for native Windows? Should they be > treated as a logical end of line (the same as a LF in posix systems), or > as a CR character followed by an end of line? The former. It should be okay to have Texinfo source file with CRLF end-of-line, IMO, because they can be produced by editors which default to that, or maybe even support only that. > 2) output > > For Info output there is no need for discussion, it leans towards being > binary, CR is a character among others, only LF is an end of line. The > output is naturally done in binary mode. > > For LaTeX, HTML, DocBook and plaintext..., we have textual output files. > Should the end of line in output files be CRLF or LF? In general, IMO the preference should be to produce native EOL format, because the output files can be read by arbitrary native tools, some of which might have problems with Unix-style newline-only EOL format. For Info files, you have decided to use Unix-style EOLs due to complications in byte counting (which are solvable, but are still complications). These complications don't exist in other formats, AFAIU.
