Skip to content

Harness now reports a difference in line endings when comparing baselines #3030

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 4 commits into from
May 5, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make the harness report a failure if the line endings differ from the…
… baselines
  • Loading branch information
JsonFreeman committed May 5, 2015
commit d3a2c2a042bd85839054fa2b6e56edb4e40a021c
4 changes: 2 additions & 2 deletions src/harness/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1702,9 +1702,9 @@ module Harness {
expected = IO.readFile(refFileName);
}

var lineEndingSensitive = opts && opts.LineEndingSensitive;
var lineEndingInsensitive = opts && opts.LineEndingSensitive === false; // default is true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who sets this flag? i could not find it used anywhere... if that is correct.. then remove this whole section instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find it either. You're right, I should remove it.


if (!lineEndingSensitive) {
if (lineEndingInsensitive) {
expected = expected.replace(/\r\n?/g, '\n');
actual = actual.replace(/\r\n?/g, '\n');
}
Expand Down