| OLD | NEW |
| (Empty) |
| 1 This page tests toString conversion of RegExp objects, particularly wrt to '/' c
haracters and RegExp.prototype. | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 | |
| 6 FAIL RegExp('/').source should be \/. Was /. | |
| 7 PASS RegExp('').source is "(?:)" | |
| 8 PASS RegExp.prototype.source is "(?:)" | |
| 9 FAIL RegExp('/').toString() should be /\//. Was ///. | |
| 10 PASS RegExp('').toString() is "/(?:)/" | |
| 11 PASS RegExp.prototype.toString() is "/(?:)/" | |
| 12 FAIL testForwardSlash("^/$", "/"); should be true. Threw exception SyntaxError:
Unexpected end of input | |
| 13 FAIL testForwardSlash("^/$", "/"); should be true. Threw exception SyntaxError:
Unexpected end of input | |
| 14 FAIL testForwardSlash("^\/$", "/"); should be true. Threw exception SyntaxError:
Unexpected end of input | |
| 15 PASS testForwardSlash("^\\/$", "\/"); is true | |
| 16 PASS testForwardSlash("^\\\/$", "\/"); is true | |
| 17 FAIL testForwardSlash("^\\\\/$", "\\/"); should be true. Threw exception SyntaxE
rror: Unexpected end of input | |
| 18 FAIL testForwardSlash("^\\\\\/$", "\\/"); should be true. Threw exception Syntax
Error: Unexpected end of input | |
| 19 FAIL testForwardSlash("x/x/x", "x\/x\/x"); should be true. Threw exception Synta
xError: Unexpected end of input | |
| 20 FAIL testForwardSlash("x\/x/x", "x\/x\/x"); should be true. Threw exception Synt
axError: Unexpected end of input | |
| 21 FAIL testForwardSlash("x/x\/x", "x\/x\/x"); should be true. Threw exception Synt
axError: Unexpected end of input | |
| 22 FAIL testForwardSlash("x\/x\/x", "x\/x\/x"); should be true. Threw exception Syn
taxError: Unexpected end of input | |
| 23 FAIL testLineTerminator("\n"); should be false. Was true. | |
| 24 PASS testLineTerminator("\\n"); is false | |
| 25 FAIL testLineTerminator("\r"); should be false. Was true. | |
| 26 PASS testLineTerminator("\\r"); is false | |
| 27 FAIL testLineTerminator("\u2028"); should be false. Was true. | |
| 28 PASS testLineTerminator("\\u2028"); is false | |
| 29 FAIL testLineTerminator("\u2029"); should be false. Was true. | |
| 30 PASS testLineTerminator("\\u2029"); is false | |
| 31 PASS RegExp('[/]').source is '[/]' | |
| 32 FAIL RegExp('\\[/]').source should be \[\/]. Was \[/]. | |
| 33 PASS var o = new RegExp(); o.toString() === '/'+o.source+'/' && eval(o.toString(
)+'.exec(String())') is [""] | |
| 34 PASS successfullyParsed is true | |
| 35 | |
| 36 TEST COMPLETE | |
| 37 | |
| OLD | NEW |