blob: 4eb441c7a68698d3b630a43de52ea26f0ce3c9f8 [file] [log] [blame]
"use strict";
var bigString = "x";
while (bigString.length < 200000)
bigString = bigString + bigString;
if (bigString.length != 262144)
throw "Error: bad string length: " + bigString.length;
var result = /x/g[Symbol.match](bigString);
if (result.length != 262144)
throw "Error: bad result array length: " + result.length;
for (var i = 0; i < result.length; ++i) {
if (result[i] != "x")
throw "Error: array does not contain \"x\" at i = " + i + ": " + result[i];
}