Added a regex test
This commit is contained in:
parent
45ddfa7c75
commit
80db03efaa
|
@ -0,0 +1,27 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,18): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,22): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,18): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,26): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,27): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts (6 errors) ====
|
||||
var regex1 = / asdf /;
|
||||
var regex2 = /**// asdf /;
|
||||
var regex3 = /**///**/ asdf / // should be a comment line
|
||||
1;
|
||||
var regex4 = /**// /**/asdf /;
|
||||
~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
var regex5 = /**// asdf/**/ /;
|
||||
~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
@ -0,0 +1,14 @@
|
|||
//// [parseRegularExpressionMixedWithComments.ts]
|
||||
var regex1 = / asdf /;
|
||||
var regex2 = /**// asdf /;
|
||||
var regex3 = /**///**/ asdf / // should be a comment line
|
||||
1;
|
||||
var regex4 = /**// /**/asdf /;
|
||||
var regex5 = /**// asdf/**/ /;
|
||||
|
||||
//// [parseRegularExpressionMixedWithComments.js]
|
||||
var regex1 = / asdf /;
|
||||
var regex2 = / asdf /;
|
||||
var regex3 = 1;
|
||||
var regex4 = / / * * /asdf /;
|
||||
var regex5 = / asdf/ * * / /;
|
|
@ -0,0 +1,6 @@
|
|||
var regex1 = / asdf /;
|
||||
var regex2 = /**// asdf /;
|
||||
var regex3 = /**///**/ asdf / // should be a comment line
|
||||
1;
|
||||
var regex4 = /**// /**/asdf /;
|
||||
var regex5 = /**// asdf/**/ /;
|
Loading…
Reference in a new issue