Skip to content

Commit d78e5a1

Browse files
committed
Normalize line endings when validating baselines
1 parent 0112a38 commit d78e5a1

File tree

9 files changed

+416
-415
lines changed

9 files changed

+416
-415
lines changed

src/harness/unittests/initializeTSConfig.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="..\harness.ts" />
1+
/// <reference path="..\harness.ts" />
22
/// <reference path="..\..\compiler\commandLineParser.ts" />
33

44
namespace ts {
@@ -12,7 +12,8 @@ namespace ts {
1212
it(`Correct output for ${outputFileName}`, () => {
1313
Harness.Baseline.runBaseline(outputFileName, () => {
1414
if (initResult) {
15-
return initResult;
15+
// normalize line endings
16+
return initResult.replace(new RegExp(sys.newLine, "g"), "\n");
1617
}
1718
else {
1819
// This can happen if compiler recieve invalid compiler-options
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
{
2-
"compilerOptions": {
3-
/* Basic Options */
4-
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5-
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
6-
// "lib": [], /* Specify library files to be included in the compilation: */
7-
// "allowJs": true, /* Allow javascript files to be compiled. */
8-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
9-
// "declaration": true, /* Generates corresponding '.d.ts' file. */
10-
// "sourceMap": true, /* Generates corresponding '.map' file. */
11-
// "outFile": "./", /* Concatenate and emit output to single file. */
12-
// "outDir": "./", /* Redirect output structure to the directory. */
13-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
14-
// "removeComments": true, /* Do not emit comments to output. */
15-
// "noEmit": true, /* Do not emit outputs. */
16-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
17-
// "downlevelIteration": true, /* Use full down-level iteration for iterables and arrays for 'for-of', spread, and destructuring in ES5/3. */
18-
// "isolatedModules": true, /* Unconditionally emit imports for unresolved files. */
19-
20-
/* Strict Type Checks */
21-
"strict": true /* Enable all strict type checks. */
22-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
23-
// "strictNullChecks": true, /* Enable strict null checks. */
24-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
25-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
26-
27-
/* Additional Checks */
28-
// "noUnusedLocals": true, /* Report errors on unused locals. */
29-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
30-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
31-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
32-
33-
/* Module Resolution Options */
34-
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
35-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
36-
// "paths": {}, /* List of path mapping entries for module names to locations relative to the 'baseUrl'. */
37-
// "rootDirs": [], /* List of root folders whose combined content represent the structure of the project at runtime. */
38-
// "typeRoots": [], /* List of folders to include type definitions from. */
39-
// "types": [], /* Type declaration files to be included in compilation. */
40-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
41-
42-
/* SourceMap Options */
43-
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
44-
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
45-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
46-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
47-
48-
/* Experimental Options */
49-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
50-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
51-
}
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5+
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
6+
// "lib": [], /* Specify library files to be included in the compilation: */
7+
// "allowJs": true, /* Allow javascript files to be compiled. */
8+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
9+
// "declaration": true, /* Generates corresponding '.d.ts' file. */
10+
// "sourceMap": true, /* Generates corresponding '.map' file. */
11+
// "outFile": "./", /* Concatenate and emit output to single file. */
12+
// "outDir": "./", /* Redirect output structure to the directory. */
13+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
14+
// "removeComments": true, /* Do not emit comments to output. */
15+
// "noEmit": true, /* Do not emit outputs. */
16+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
17+
// "downlevelIteration": true, /* Use full down-level iteration for iterables and arrays for 'for-of', spread, and destructuring in ES5/3. */
18+
// "isolatedModules": true, /* Unconditionally emit imports for unresolved files. */
19+
20+
/* Strict Type Checks */
21+
"strict": true /* Enable all strict type checks. */
22+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
23+
// "strictNullChecks": true, /* Enable strict null checks. */
24+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
25+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
26+
27+
/* Additional Checks */
28+
// "noUnusedLocals": true, /* Report errors on unused locals. */
29+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
30+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
31+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
32+
33+
/* Module Resolution Options */
34+
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
35+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
36+
// "paths": {}, /* List of path mapping entries for module names to locations relative to the 'baseUrl'. */
37+
// "rootDirs": [], /* List of root folders whose combined content represent the structure of the project at runtime. */
38+
// "typeRoots": [], /* List of folders to include type definitions from. */
39+
// "types": [], /* Type declaration files to be included in compilation. */
40+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
41+
42+
/* SourceMap Options */
43+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
44+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
45+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
46+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
47+
48+
/* Experimental Options */
49+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
50+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
51+
}
5252
}
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
{
2-
"compilerOptions": {
3-
/* Basic Options */
4-
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5-
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
6-
// "lib": [], /* Specify library files to be included in the compilation: */
7-
// "allowJs": true, /* Allow javascript files to be compiled. */
8-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
9-
// "declaration": true, /* Generates corresponding '.d.ts' file. */
10-
// "sourceMap": true, /* Generates corresponding '.map' file. */
11-
// "outFile": "./", /* Concatenate and emit output to single file. */
12-
// "outDir": "./", /* Redirect output structure to the directory. */
13-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
14-
// "removeComments": true, /* Do not emit comments to output. */
15-
// "noEmit": true, /* Do not emit outputs. */
16-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
17-
// "downlevelIteration": true, /* Use full down-level iteration for iterables and arrays for 'for-of', spread, and destructuring in ES5/3. */
18-
// "isolatedModules": true, /* Unconditionally emit imports for unresolved files. */
19-
20-
/* Strict Type Checks */
21-
"strict": true, /* Enable all strict type checks. */
22-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
23-
// "strictNullChecks": true, /* Enable strict null checks. */
24-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
25-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
26-
27-
/* Additional Checks */
28-
"noUnusedLocals": true /* Report errors on unused locals. */
29-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
30-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
31-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
32-
33-
/* Module Resolution Options */
34-
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
35-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
36-
// "paths": {}, /* List of path mapping entries for module names to locations relative to the 'baseUrl'. */
37-
// "rootDirs": [], /* List of root folders whose combined content represent the structure of the project at runtime. */
38-
// "typeRoots": [], /* List of folders to include type definitions from. */
39-
// "types": [], /* Type declaration files to be included in compilation. */
40-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
41-
42-
/* SourceMap Options */
43-
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
44-
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
45-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
46-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
47-
48-
/* Experimental Options */
49-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
50-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
51-
}
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5+
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
6+
// "lib": [], /* Specify library files to be included in the compilation: */
7+
// "allowJs": true, /* Allow javascript files to be compiled. */
8+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
9+
// "declaration": true, /* Generates corresponding '.d.ts' file. */
10+
// "sourceMap": true, /* Generates corresponding '.map' file. */
11+
// "outFile": "./", /* Concatenate and emit output to single file. */
12+
// "outDir": "./", /* Redirect output structure to the directory. */
13+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
14+
// "removeComments": true, /* Do not emit comments to output. */
15+
// "noEmit": true, /* Do not emit outputs. */
16+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
17+
// "downlevelIteration": true, /* Use full down-level iteration for iterables and arrays for 'for-of', spread, and destructuring in ES5/3. */
18+
// "isolatedModules": true, /* Unconditionally emit imports for unresolved files. */
19+
20+
/* Strict Type Checks */
21+
"strict": true, /* Enable all strict type checks. */
22+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
23+
// "strictNullChecks": true, /* Enable strict null checks. */
24+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
25+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
26+
27+
/* Additional Checks */
28+
"noUnusedLocals": true /* Report errors on unused locals. */
29+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
30+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
31+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
32+
33+
/* Module Resolution Options */
34+
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
35+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
36+
// "paths": {}, /* List of path mapping entries for module names to locations relative to the 'baseUrl'. */
37+
// "rootDirs": [], /* List of root folders whose combined content represent the structure of the project at runtime. */
38+
// "typeRoots": [], /* List of folders to include type definitions from. */
39+
// "types": [], /* Type declaration files to be included in compilation. */
40+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
41+
42+
/* SourceMap Options */
43+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
44+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
45+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
46+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
47+
48+
/* Experimental Options */
49+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
50+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
51+
}
5252
}

0 commit comments

Comments
 (0)