2 This page tests the exception you get when you test a regular expression against
3 the null string. If the test passes, you'll see a PASS message below.
5 <pre id=
"console"></pre>
10 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
13 function shouldBe(a
, aDescription
, b
)
16 log("PASS: " + aDescription
+ " should be '" + String(b
) + "' and is.");
20 log ("FAIL: " + aDescription
+ " should be '" + String(b
) + "' but instead is '" + String(a
) + "'.");
23 if (window
.testRunner
)
24 testRunner
.dumpAsText();
26 var result
= /define/.test();
27 shouldBe(result
, "result", true);