blob: ce31ef2fa58c78f40e261130bb35ad5461a18f3d [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var regexp = /script/;
for (var i = 0; i < 1e2; ++i) {
shouldBe(/script/.test("testtestscript"), true);
shouldBe(RegExp.leftContext, "testtest");
shouldBe(/script/.test($vm.make16BitStringIfPossible("testtestscript")), true);
shouldBe(RegExp.leftContext, "testtest");
}