blob: 8616d46dddd08345f3ab04dfc3b26f23ac7df675 [file] [log] [blame]
This is a test case for String.prototype.anchor(name).
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS '_'.anchor('b') is "<a name=\"b\">_</a>"
PASS '<'.anchor('b') is "<a name=\"b\"><</a>"
PASS '_'.anchor(0x2A) is "<a name=\"42\">_</a>"
PASS '_'.anchor('"') is "<a name=\"&quot;\">_</a>"
PASS '_'.anchor('" href="http://www.evil.com') is "<a name=\"&quot; href=&quot;http://www.evil.com\">_</a>"
PASS String.prototype.anchor.call(0x2A, 0x2A) is "<a name=\"42\">42</a>"
PASS String.prototype.anchor.call(undefined) threw exception TypeError: String.prototype.link requires that |this| not be null or undefined.
PASS String.prototype.anchor.call(null) threw exception TypeError: String.prototype.link requires that |this| not be null or undefined.
PASS String.prototype.anchor.length is 1
PASS successfullyParsed is true
TEST COMPLETE