blob: 6b1d5a0e3b42c153a82359ae33e4911e271f4155 [file] [log] [blame]
Test regular expression processing with alternatives.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS s1.match(/<((\/([^>]+)>)|(([^>]+)>))/) is ["<p>","p>",undefined,undefined,"p>","p"]
PASS s1.match(/<((ABC>)|(\/([^>]+)>)|(([^>]+)>))/) is ["<p>","p>",undefined,undefined,undefined,"p>","p"]
PASS s1.match(/<(a|\/p|.+?)>/) is ["<p>","p"]
PASS s1.match(/<((\/([^>]+)>)|((([^>])+)>))/) is ["<p>","p>",undefined,undefined,"p>","p","p"]
PASS s1.match(/<((ABC>)|(\/([^>]+)>)|((([^>])+)>))/) is ["<p>","p>",undefined,undefined,undefined,"p>","p","p"]
PASS s1.match(/<(a|\/p|(.)+?)>/) is ["<p>","p","p"]
PASS s2.match(/<((\/([^>]+)>)|(([^>]+)>))\5/) is ["<p>p","p>",undefined,undefined,"p>","p"]
PASS s2.match(/<((ABC>)|(\/([^>]+)>)|(([^>]+)>))\6/) is ["<p>p","p>",undefined,undefined,undefined,"p>","p"]
PASS s2.match(/<(a|\/p|.+?)>\1/) is ["<p>p","p"]
PASS successfullyParsed is true
TEST COMPLETE