Skip to content

Fix broken tests under CRLF environment. #2029

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

Merged
merged 1 commit into from
Oct 5, 2017
Merged

Conversation

wada314
Copy link
Contributor

@wada314 wada314 commented Oct 4, 2017

Fixes #617 ... for now.

The problem was that some codes are assuming the newline in the input code is always '\n'. Especially, str.starts_with('\n') was breaking danger because it always fail in CRLF environment.
I'm still feeling uncomfortable that so many codes seems to not consider CRLF env, but fortunately str.ends_with('\n') and str.contains('\n') both work properly under CRLF env. At least, no tests are broken in Windows anymore.

Need to push #2028 beforehand to check if the tests are really fixed under Windows.

@nrc nrc merged commit 99f14a8 into rust-lang:master Oct 5, 2017
@nrc
Copy link
Member

nrc commented Oct 5, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running cargo test on windows fails when autocrlf is set in git
2 participants