Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/bug: Sniper printer tests with literal newlines in assertions fail on Windows #3857

Closed
slarse opened this issue Mar 23, 2021 · 2 comments
Labels
bug test about adding or refactoring tests

Comments

@slarse
Copy link
Collaborator

slarse commented Mar 23, 2021

Not sure what's causing this, the sniper printer should respect the newline style used in the source file. See #3856 for an example.

@slarse slarse added bug test about adding or refactoring tests labels Mar 23, 2021
@monperrus
Copy link
Collaborator

progress made with #3881

@slarse
Copy link
Collaborator Author

slarse commented Apr 22, 2021

Oh, not only progress, this is entirely fixed. Completely forgot that this issue existed.

For future reference, the problem was that on checkout, Git converted LF line endings to CRLF line endings (core.autocrlf feature). As the sniper printer is expected to honor the actual line endings (which in the eyes of the tests are LF), and not the system default, this caused the tests to fail as the test source files had their line endings auto-converted, but the literals in the tests were unchanged.

@slarse slarse closed this as completed Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug test about adding or refactoring tests
Projects
None yet
Development

No branches or pull requests

2 participants