blob: 566edc415115729c42039ae3f818d84a5e49c497 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description(
'Test that covers capturing brackets, and was adapted from a part of an early version of Acid3.'
);
// JS regexps aren't like Perl regexps, if their character
// classes start with a ] that means they're empty. So this
// is a syntax error; if we get here it's a bug.
shouldThrow("/TA[])]/.exec('TA]')");
shouldBe("/[]/.exec('')", "null");
shouldBe("/(\\3)(\\1)(a)/.exec('cat').toString()", "'a,,,a'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>