Compatibility test depends on git core.autocrlf set to false #286

Closed
opened 2026-01-29 20:41:24 +00:00 by claunia · 1 comment
Owner

Originally created by @aasivov on GitHub (Jul 11, 2019).

Some compatibility tests fail if git config core.autocrlf is not set to false.
It is so, because these tests decompress the compressed files taken from the repo and compare results with the reference files taken from the repo.
Some of these reference files are .txt files and their line feed on checkout depends on git's autocrlf option. It may result in different line feed in that files and the decompressed files.
For an instance, tests/testdata/asyoulik.txt has LF line feeds and asyoulik.txt.unbr in compatibility test has LF line feeds. However, on windows machine with git config core.autocrlf true tests/testdata/asyoulik.txt has CRLF line feeds after checkout and test fails.
I believe that all files in tests/testdata should always be treated as binary files.
Perhaps, it's worth it to add .gitattributes to the repo and to state it there.

Originally created by @aasivov on GitHub (Jul 11, 2019). Some compatibility tests fail if **git config core.autocrlf** is not set to false. It is so, because these tests decompress the compressed files taken from the repo and compare results with the reference files taken from the repo. Some of these reference files are .txt files and their line feed on checkout depends on git's autocrlf option. It may result in different line feed in that files and the decompressed files. For an instance, _tests/testdata/asyoulik.txt_ has LF line feeds and asyoulik.txt.unbr in compatibility test has LF line feeds. However, on windows machine with **git config core.autocrlf true** _tests/testdata/asyoulik.txt_ has CRLF line feeds after checkout and test fails. I believe that all files in _tests/testdata_ should always be treated as binary files. Perhaps, it's worth it to add _.gitattributes_ to the repo and to state it there.
Author
Owner

@eustas commented on GitHub (Jul 11, 2019):

Thanks for pinpointing the problem. Going to fix it when I have the next spare moment.

@eustas commented on GitHub (Jul 11, 2019): Thanks for pinpointing the problem. Going to fix it when I have the next spare moment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#286