summaryrefslogtreecommitdiff
path: root/test/data/tokeniser2/contentModelFlags.test
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-10 12:49:49 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-10 12:49:49 +0000
commita6a2f7a824491d82af40f1ce8699ef4eb7d192e3 (patch)
treeadf73cd5fbdd41250b13c2367c001ff50cf661f2 /test/data/tokeniser2/contentModelFlags.test
parentfb097fc6e5e031c38cf9d81275559928064cd42e (diff)
downloadlibhubbub-a6a2f7a824491d82af40f1ce8699ef4eb7d192e3.tar.gz
libhubbub-a6a2f7a824491d82af40f1ce8699ef4eb7d192e3.tar.bz2
Sync tokeniser tests with html5lib.
Sync tokeniser implementation with the spec. Fix handling of \0 in the tag open state. The unicodeCharacters test is disabled, as json-c doesn't like it. svn path=/trunk/hubbub/; revision=6755
Diffstat (limited to 'test/data/tokeniser2/contentModelFlags.test')
-rw-r--r--test/data/tokeniser2/contentModelFlags.test56
1 files changed, 40 insertions, 16 deletions
diff --git a/test/data/tokeniser2/contentModelFlags.test b/test/data/tokeniser2/contentModelFlags.test
index b4f450a..1dec3e8 100644
--- a/test/data/tokeniser2/contentModelFlags.test
+++ b/test/data/tokeniser2/contentModelFlags.test
@@ -8,37 +8,61 @@
{"description":"End tag closing RCDATA or CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"pre",
-"input":"foo</pre>",
-"output":[["Character", "foo"], ["EndTag", "pre"]]},
+"lastStartTag":"xmp",
+"input":"foo</xmp>",
+"output":[["Character", "foo"], ["EndTag", "xmp"]]},
{"description":"End tag closing RCDATA or CDATA (case-insensitivity)",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"pre",
-"input":"foo</pRe>",
-"output":[["Character", "foo"], ["EndTag", "pre"]]},
+"lastStartTag":"xmp",
+"input":"foo</xMp>",
+"output":[["Character", "foo"], ["EndTag", "xmp"]]},
+
+{"description":"End tag closing RCDATA or CDATA (ending with space)",
+"contentModelFlags":["RCDATA", "CDATA"],
+"lastStartTag":"xmp",
+"input":"foo</xmp ",
+"output":[["Character", "foo"], "ParseError", ["EndTag", "xmp"]]},
+
+{"description":"End tag closing RCDATA or CDATA (ending with EOF)",
+"contentModelFlags":["RCDATA", "CDATA"],
+"lastStartTag":"xmp",
+"input":"foo</xmp",
+"output":[["Character", "foo"], "ParseError", ["EndTag", "xmp"]]},
+
+{"description":"End tag closing RCDATA or CDATA (ending with slash)",
+"contentModelFlags":["RCDATA", "CDATA"],
+"lastStartTag":"xmp",
+"input":"foo</xmp/",
+"output":[["Character", "foo"], "ParseError", ["EndTag", "xmp"]]},
+
+{"description":"End tag not closing RCDATA or CDATA (ending with left-angle-bracket)",
+"contentModelFlags":["RCDATA", "CDATA"],
+"lastStartTag":"xmp",
+"input":"foo</xmp<",
+"output":[["Character", "foo</xmp<"]]},
{"description":"End tag with incorrect name in RCDATA or CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"pre",
-"input":"</foo>bar</pre>",
-"output":[["Character", "</foo>bar"], ["EndTag", "pre"]]},
+"lastStartTag":"xmp",
+"input":"</foo>bar</xmp>",
+"output":[["Character", "</foo>bar"], ["EndTag", "xmp"]]},
{"description":"End tag with incorrect name in RCDATA or CDATA (starting like correct name)",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"pre",
-"input":"</foo>bar</preaar>",
-"output":[["Character", "</foo>bar</preaar>"]]},
+"lastStartTag":"xmp",
+"input":"</foo>bar</xmpaar>",
+"output":[["Character", "</foo>bar</xmpaar>"]]},
{"description":"End tag closing RCDATA or CDATA, switching back to PCDATA",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"pre",
-"input":"foo</pre></baz>",
-"output":[["Character", "foo"], ["EndTag", "pre"], ["EndTag", "baz"]]},
+"lastStartTag":"xmp",
+"input":"foo</xmp></baz>",
+"output":[["Character", "foo"], ["EndTag", "xmp"], ["EndTag", "baz"]]},
{"description":"CDATA w/ something looking like an entity",
"contentModelFlags":["CDATA"],
-"lastStartTag":"pre",
+"lastStartTag":"xmp",
"input":"&foo;",
"output":[["Character", "&foo;"]]},