19 lines
879 B
Plaintext
19 lines
879 B
Plaintext
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=\""\">_</a>"
|
|
PASS '_'.anchor('" href="http://www.evil.com') is "<a name=\"" href="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
|
|
|