Skip to content

Commit eca4af5

Browse files
author
Kanchalai Tanglertsampan
committed
When making unit test only include non empty line. This is crucial because it will allow us to test shebang which has to be the first line
1 parent 65da012 commit eca4af5

File tree

4,746 files changed

+25133
-29946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,746 files changed

+25133
-29946
lines changed

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ namespace Harness {
18851885
if (currentFileContent === undefined) {
18861886
currentFileContent = "";
18871887
}
1888-
else {
1888+
else if (currentFileContent !== "") {
18891889
// End-of-line
18901890
currentFileContent = currentFileContent + "\n";
18911891
}

tests/baselines/reference/APISample_compile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//// [APISample_compile.ts]
2-
32
/*
43
* Note: This test is a public API sample. The sample sources can be found
54
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler

tests/baselines/reference/APISample_linter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//// [APISample_linter.ts]
2-
32
/*
43
* Note: This test is a public API sample. The sample sources can be found
54
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter

tests/baselines/reference/APISample_parseConfig.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//// [APISample_parseConfig.ts]
2-
32
/*
43
* Note: This test is a public API sample. The sample sources can be found
54
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler

tests/baselines/reference/APISample_transform.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//// [APISample_transform.ts]
2-
32
/*
43
* Note: This test is a public API sample. The sample sources can be found
54
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function

tests/baselines/reference/APISample_watcher.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//// [APISample_watcher.ts]
2-
32
/*
43
* Note: This test is a public API sample. The sample sources can be found
54
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services

tests/baselines/reference/DeclarationErrorsNoEmitOnError.errors.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts(4,8): error TS4033: Property 'f' of exported interface has or is using private name 'T'.
1+
tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts(3,8): error TS4033: Property 'f' of exported interface has or is using private name 'T'.
22

33

44
==== tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts (1 errors) ====
5-
65
type T = { x : number }
76
export interface I {
87
f: T;

tests/baselines/reference/ES5for-of32.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//// [ES5for-of32.ts]
2-
32
var array = [1,2,3];
43
var sum = 0;
54

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
=== tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts ===
2-
32
var array = [1,2,3];
4-
>array : Symbol(array, Decl(ES5for-of32.ts, 1, 3))
3+
>array : Symbol(array, Decl(ES5for-of32.ts, 0, 3))
54

65
var sum = 0;
7-
>sum : Symbol(sum, Decl(ES5for-of32.ts, 2, 3))
6+
>sum : Symbol(sum, Decl(ES5for-of32.ts, 1, 3))
87

98
for (let num of array) {
10-
>num : Symbol(num, Decl(ES5for-of32.ts, 4, 8))
11-
>array : Symbol(array, Decl(ES5for-of32.ts, 1, 3))
9+
>num : Symbol(num, Decl(ES5for-of32.ts, 3, 8))
10+
>array : Symbol(array, Decl(ES5for-of32.ts, 0, 3))
1211

1312
if (sum === 0) {
14-
>sum : Symbol(sum, Decl(ES5for-of32.ts, 2, 3))
13+
>sum : Symbol(sum, Decl(ES5for-of32.ts, 1, 3))
1514

1615
array = [4,5,6]
17-
>array : Symbol(array, Decl(ES5for-of32.ts, 1, 3))
16+
>array : Symbol(array, Decl(ES5for-of32.ts, 0, 3))
1817
}
1918

2019
sum += num;
21-
>sum : Symbol(sum, Decl(ES5for-of32.ts, 2, 3))
22-
>num : Symbol(num, Decl(ES5for-of32.ts, 4, 8))
20+
>sum : Symbol(sum, Decl(ES5for-of32.ts, 1, 3))
21+
>num : Symbol(num, Decl(ES5for-of32.ts, 3, 8))
2322
}

tests/baselines/reference/ES5for-of32.types

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
=== tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts ===
2-
32
var array = [1,2,3];
43
>array : number[]
54
>[1,2,3] : number[]

0 commit comments

Comments
 (0)