1 <p>This test verifies that implicit creation of a regular expression eagerly checks for syntax errors.
</p>
2 <p>If the test passes, you'll see pass messages below.
</p>
3 <pre id=
"console"></pre>
8 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
11 function shouldThrow(program
)
15 log("FAIL: " + program
+ " should throw an exception but didn't");
17 log("PASS: " + program
+ " should throw an exception and did: " + e
+ ".");
21 if (window
.testRunner
)
22 testRunner
.dumpAsText();
24 shouldThrow('"abc".search("[")');
25 shouldThrow('"abc".match("[")');