Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
489 bytes
|
Line | |
---|
1 | var fails = require('../internals/fails');
|
---|
2 |
|
---|
3 | // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
---|
4 | var RE = function (s, f) {
|
---|
5 | return RegExp(s, f);
|
---|
6 | };
|
---|
7 |
|
---|
8 | exports.UNSUPPORTED_Y = fails(function () {
|
---|
9 | var re = RE('a', 'y');
|
---|
10 | re.lastIndex = 2;
|
---|
11 | return re.exec('abcd') != null;
|
---|
12 | });
|
---|
13 |
|
---|
14 | exports.BROKEN_CARET = fails(function () {
|
---|
15 | // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
---|
16 | var re = RE('^r', 'gy');
|
---|
17 | re.lastIndex = 2;
|
---|
18 | return re.exec('str') != null;
|
---|
19 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.