Merge pull request #3030 from Microsoft/lineEndings

Harness now reports a difference in line endings when comparing baselines
This commit is contained in:
Jason Freeman
2015-05-05 12:17:46 -07:00
10 changed files with 82 additions and 90 deletions

View File

@@ -1610,7 +1610,6 @@ module Harness {
export module Baseline {
export interface BaselineOptions {
LineEndingSensitive?: boolean;
Subfolder?: string;
Baselinefolder?: string;
}
@@ -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 };
}

View File

@@ -1,9 +1,9 @@
//// [newLineFlagWithCRLF.ts]
//// [newLineFlagWithCRLF.ts]
var x=1;
x=2;
//// [newLineFlagWithCRLF.js]
var x = 1;
x = 2;
//// [newLineFlagWithCRLF.js]
var x = 1;
x = 2;

View File

@@ -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))

View File

@@ -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

View File

@@ -1,9 +1,9 @@
//// [newLineFlagWithLF.ts]
//// [newLineFlagWithLF.ts]
var x=1;
x=2;
//// [newLineFlagWithLF.js]
//// [newLineFlagWithLF.js]
var x = 1;
x = 2;

View File

@@ -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))

View File

@@ -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

View File

@@ -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);

View File

@@ -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))

View File

@@ -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