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
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 0 additions & 8 deletions src/harness/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,6 @@ module Harness {
export module Baseline {

export interface BaselineOptions {
LineEndingSensitive?: boolean;
Subfolder?: string;
Baselinefolder?: string;
}
Expand Down Expand Up @@ -1702,13 +1701,6 @@ module Harness {
expected = IO.readFile(refFileName);
}

var lineEndingSensitive = opts && opts.LineEndingSensitive;

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

return { expected, actual };
}

Expand Down
12 changes: 6 additions & 6 deletions tests/baselines/reference/newLineFlagWithCRLF.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//// [newLineFlagWithCRLF.ts]
//// [newLineFlagWithCRLF.ts]
var x=1;
Copy link
Contributor

Choose a reason for hiding this comment

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

this file should be line ending sensitive.

Copy link
Member

Choose a reason for hiding this comment

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

It is, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhegazy I'm not sure what you mean.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry missed the change in name of the variable.. can you also make sure that these files are never normalized.. or if you are deleting the code, then we are fine :)

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 plan to delete the code.

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've now deleted the code.

x=2;



//// [newLineFlagWithCRLF.js]
var x = 1;
x = 2;
//// [newLineFlagWithCRLF.js]
var x = 1;
x = 2;
16 changes: 8 additions & 8 deletions tests/baselines/reference/newLineFlagWithCRLF.symbols
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
=== tests/cases/compiler/newLineFlagWithCRLF.ts ===
var x=1;
>x : Symbol(x, Decl(newLineFlagWithCRLF.ts, 0, 3))

x=2;
>x : Symbol(x, Decl(newLineFlagWithCRLF.ts, 0, 3))


=== tests/cases/compiler/newLineFlagWithCRLF.ts ===
var x=1;
>x : Symbol(x, Decl(newLineFlagWithCRLF.ts, 0, 3))
x=2;
>x : Symbol(x, Decl(newLineFlagWithCRLF.ts, 0, 3))
22 changes: 11 additions & 11 deletions tests/baselines/reference/newLineFlagWithCRLF.types
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== tests/cases/compiler/newLineFlagWithCRLF.ts ===
var x=1;
>x : number
>1 : number

x=2;
>x=2 : number
>x : number
>2 : number


=== tests/cases/compiler/newLineFlagWithCRLF.ts ===
var x=1;
>x : number
>1 : number
x=2;
>x=2 : number
>x : number
>2 : number
8 changes: 4 additions & 4 deletions tests/baselines/reference/newLineFlagWithLF.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//// [newLineFlagWithLF.ts]
//// [newLineFlagWithLF.ts]
var x=1;
x=2;



//// [newLineFlagWithLF.js]
//// [newLineFlagWithLF.js]
var x = 1;
x = 2;
16 changes: 8 additions & 8 deletions tests/baselines/reference/newLineFlagWithLF.symbols
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
=== tests/cases/compiler/newLineFlagWithLF.ts ===
var x=1;
>x : Symbol(x, Decl(newLineFlagWithLF.ts, 0, 3))

x=2;
>x : Symbol(x, Decl(newLineFlagWithLF.ts, 0, 3))


=== tests/cases/compiler/newLineFlagWithLF.ts ===
var x=1;
>x : Symbol(x, Decl(newLineFlagWithLF.ts, 0, 3))
x=2;
>x : Symbol(x, Decl(newLineFlagWithLF.ts, 0, 3))
22 changes: 11 additions & 11 deletions tests/baselines/reference/newLineFlagWithLF.types
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== tests/cases/compiler/newLineFlagWithLF.ts ===
var x=1;
>x : number
>1 : number

x=2;
>x=2 : number
>x : number
>2 : number


=== tests/cases/compiler/newLineFlagWithLF.ts ===
var x=1;
>x : number
>1 : number
x=2;
>x=2 : number
>x : number
>2 : number
32 changes: 16 additions & 16 deletions tests/baselines/reference/noEmitHelpers.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
//// [noEmitHelpers.ts]
//// [noEmitHelpers.ts]

class A { }
class B extends A { }


//// [noEmitHelpers.js]
var A = (function () {
function A() {
}
return A;
})();
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
})(A);
//// [noEmitHelpers.js]
var A = (function () {
function A() {
}
return A;
})();
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
})(A);
18 changes: 9 additions & 9 deletions tests/baselines/reference/noEmitHelpers.symbols
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== tests/cases/compiler/noEmitHelpers.ts ===

class A { }
>A : Symbol(A, Decl(noEmitHelpers.ts, 0, 0))

class B extends A { }
>B : Symbol(B, Decl(noEmitHelpers.ts, 1, 11))
>A : Symbol(A, Decl(noEmitHelpers.ts, 0, 0))

=== tests/cases/compiler/noEmitHelpers.ts ===
class A { }
>A : Symbol(A, Decl(noEmitHelpers.ts, 0, 0))
class B extends A { }
>B : Symbol(B, Decl(noEmitHelpers.ts, 1, 11))
>A : Symbol(A, Decl(noEmitHelpers.ts, 0, 0))
18 changes: 9 additions & 9 deletions tests/baselines/reference/noEmitHelpers.types
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== tests/cases/compiler/noEmitHelpers.ts ===

class A { }
>A : A

class B extends A { }
>B : B
>A : A

=== tests/cases/compiler/noEmitHelpers.ts ===
class A { }
>A : A
class B extends A { }
>B : B
>A : A