mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Merge pull request #3030 from Microsoft/lineEndings
Harness now reports a difference in line endings when comparing baselines
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//// [newLineFlagWithLF.ts]
|
||||
//// [newLineFlagWithLF.ts]
|
||||
var x=1;
|
||||
x=2;
|
||||
|
||||
|
||||
|
||||
//// [newLineFlagWithLF.js]
|
||||
|
||||
|
||||
//// [newLineFlagWithLF.js]
|
||||
var x = 1;
|
||||
x = 2;
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user