You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
489 B

var fails = require('../internals/fails');
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
var RE = function (s, f) {
return RegExp(s, f);
};
exports.UNSUPPORTED_Y = fails(function () {
var re = RE('a', 'y');
re.lastIndex = 2;
return re.exec('abcd') != null;
});
exports.BROKEN_CARET = fails(function () {
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
var re = RE('^r', 'gy');
re.lastIndex = 2;
return re.exec('str') != null;
});