blob: b103d586818168d45188191e103c6d3186247378 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
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")');
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>