blob: 22e0eaa1464c6b4983354560546816ea9065d507 [file] [log] [blame]
description('Tests a regular expression that hits the recursion limit.');
var complexPattern = "";
for (var i = 0; i < 18; ++i)
complexPattern += "a?";
for (var i = 0; i < 18; ++i)
complexPattern += "a";
complexPattern = "\1(" + complexPattern + ")";
var complexInput = "";
for (var i = 0; i < 18; ++i)
complexInput += "a";
shouldBe('new RegExp(complexPattern + complexPattern).exec(complexInput + complexInput)', 'null'); // Too big
var successfullyParsed = true;