mirror of
https://github.com/tc39/test262.git
synced 2025-05-05 07:20:27 +02:00
* [javascriptcore-test262-automation] changes from git@github.com:WebKit/webkit.git at sha 949e26452cfa153a7f4afe593da97e2fe9e1b706 on Tue Jul 03 2018 14:35:15 GMT-0400 (Eastern Daylight Time)
15 lines
645 B
JavaScript
15 lines
645 B
JavaScript
// Regression test for 159744. This test should not crash or throw an exception.
|
|
|
|
function testRegExp(pattern, flags, string, result)
|
|
{
|
|
let r = new RegExp(pattern, flags);
|
|
if (r.exec(string) !== result)
|
|
throw("Expected " + r + "exec(\"" + string + "\") to return " + result + ".");
|
|
}
|
|
|
|
testRegExp("(\\w+)(?:\\s(\\1)){1100000000,}", "i", "word Word WORD WoRd", null);
|
|
testRegExp("\\d{4,}.{1073741825}", "", "1234567\u1234", null);
|
|
testRegExp("(?:abcd){2148473648,}", "", "abcdabcdabcd", null);
|
|
testRegExp("(?:abcd){2148473648,}", "y", "abcdabcdabcd", null);
|
|
testRegExp("(ab){1073741825,}(xy){1073741825,}", "", "abxyabxy", null);
|