Normalize line endings when validating baselines

This commit is contained in:
Mohamed Hegazy
2017-03-15 18:39:44 -07:00
parent 0112a38ec9
commit d78e5a1db5
9 changed files with 416 additions and 415 deletions

View File

@@ -1,4 +1,4 @@
/// <reference path="..\harness.ts" />
/// <reference path="..\harness.ts" />
/// <reference path="..\..\compiler\commandLineParser.ts" />
namespace ts {
@@ -12,7 +12,8 @@ namespace ts {
it(`Correct output for ${outputFileName}`, () => {
Harness.Baseline.runBaseline(outputFileName, () => {
if (initResult) {
return initResult;
// normalize line endings
return initResult.replace(new RegExp(sys.newLine, "g"), "\n");
}
else {
// This can happen if compiler recieve invalid compiler-options