blob: a3854b5d5677a2f9122f8b61bcc09f9a7aaed2b4 [file] [log] [blame]
description(
"This page tests assertions followed by quantifiers."
);
var regexp;
regexp = /(?=a){0}/gm;
debug("\nTesting regexp: " + regexp);
shouldBeTrue("regexp.test('a')");
shouldBe("regexp.lastIndex", "0");
regexp = /(?=a){1}/gm;
debug("\nTesting regexp: " + regexp);
shouldBeTrue("regexp.test('a')");
shouldBe("regexp.lastIndex", "0");
regexp = /(?!a){0}/gm;
debug("\nTesting regexp: " + regexp);
shouldBeTrue("regexp.test('b')");
shouldBe("regexp.lastIndex", "0");
regexp = /(?!a){1}/gm;
debug("\nTesting regexp: " + regexp);
shouldBeTrue("regexp.test('b')");
shouldBe("regexp.lastIndex", "0");
shouldBeTrue('/^(?=a)?b$/.test("b")');
var successfullyParsed = true;