Skip to content

dump_preprocessed_input test fails on Windows when checked out with CRLF line endings #1023

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

Closed
AndrewGaspar opened this issue Sep 23, 2017 · 4 comments

Comments

@AndrewGaspar
Copy link
Contributor

On Windows, typically users set the git core.autocrlf=true option to checkout files with Windows-style line endings, but to checkin with Unix-style line endings.

The dump_preprocessed_input test validates that an output file __bindgen.ii contains an input file arg_keyword.hpp. However, __bindgen.ii is output with LF line endings, and so arg_keyword.hpp's contents do not match.

I've validated the test passes if you check out the repo with LF line endings.

@AndrewGaspar
Copy link
Contributor Author

The reason this doesn't seem to be an issue with the rest of the tests is because rustfmt normalizes the line endings to LF when doing the comparison

@AndrewGaspar
Copy link
Contributor Author

@highfive: assign me

@highfive
Copy link

Hey @AndrewGaspar! Thanks for your interest in working on this issue. It's now assigned to you!

bors-servo pushed a commit that referenced this issue Sep 25, 2017
…=fitzgen

Always check out test headers and expectations as LF

Addresses #1023.

The line endings accidentally don't matter for the majority of the tests because we pass both the generated .rs files and expectations .rs files through rustfmt, which normalizes the line endings to LF. But this change makes it explicit that we expect to test against files with LF line endings.
@fitzgen
Copy link
Member

fitzgen commented Oct 12, 2017

FYI @AndrewGaspar, if you add Fixes #12345 to the commit message or PR comment, then github will automatically close the issue when the PR is merged :)

@fitzgen fitzgen closed this as completed Oct 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants