Merge pull request #18638 from Microsoft/addTestRegex

Adds regression test for parsing bug
This commit is contained in:
Daniel Rosenwasser
2017-09-21 09:39:01 -07:00
committed by GitHub
4 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
//// [parserNotRegex2.ts]
declare const A: any;
declare const B: any;
declare const C: any;
const x = (A / 2);
B(
C(),
() => { },
() => { }
);
//// [parserNotRegex2.js]
var x = (A / 2);
B(C(), function () { }, function () { });

View File

@@ -0,0 +1,24 @@
=== tests/cases/conformance/parser/ecmascript5/parserNotRegex2.ts ===
declare const A: any;
>A : Symbol(A, Decl(parserNotRegex2.ts, 0, 13))
declare const B: any;
>B : Symbol(B, Decl(parserNotRegex2.ts, 1, 13))
declare const C: any;
>C : Symbol(C, Decl(parserNotRegex2.ts, 2, 13))
const x = (A / 2);
>x : Symbol(x, Decl(parserNotRegex2.ts, 3, 5))
>A : Symbol(A, Decl(parserNotRegex2.ts, 0, 13))
B(
>B : Symbol(B, Decl(parserNotRegex2.ts, 1, 13))
C(),
>C : Symbol(C, Decl(parserNotRegex2.ts, 2, 13))
() => { },
() => { }
);

View File

@@ -0,0 +1,33 @@
=== tests/cases/conformance/parser/ecmascript5/parserNotRegex2.ts ===
declare const A: any;
>A : any
declare const B: any;
>B : any
declare const C: any;
>C : any
const x = (A / 2);
>x : number
>(A / 2) : number
>A / 2 : number
>A : any
>2 : 2
B(
>B( C(), () => { }, () => { }) : any
>B : any
C(),
>C() : any
>C : any
() => { },
>() => { } : () => void
() => { }
>() => { } : () => void
);

View File

@@ -0,0 +1,9 @@
declare const A: any;
declare const B: any;
declare const C: any;
const x = (A / 2);
B(
C(),
() => { },
() => { }
);