summaryrefslogtreecommitdiff
path: root/test/data/tokeniser2/contentModelFlags.test
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-06-16 05:37:06 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-06-16 05:37:06 +0000
commit32386253b3e285406fc5bc5cbd2567b14a18524f (patch)
tree23824c752b7dd5e60e7a88042b21e2b5e70e5d38 /test/data/tokeniser2/contentModelFlags.test
parentdfdc3e098d65ebcd7bc0c247d179201f81132ccb (diff)
downloadlibhubbub-32386253b3e285406fc5bc5cbd2567b14a18524f.tar.gz
libhubbub-32386253b3e285406fc5bc5cbd2567b14a18524f.tar.bz2
Update the testsuite to match the tokeniser. Also, import new html5lib tests for better coverage. Known issue: the tokeniser test stalls using the testrunner script.
svn path=/trunk/hubbub/; revision=4356
Diffstat (limited to 'test/data/tokeniser2/contentModelFlags.test')
-rw-r--r--test/data/tokeniser2/contentModelFlags.test33
1 files changed, 24 insertions, 9 deletions
diff --git a/test/data/tokeniser2/contentModelFlags.test b/test/data/tokeniser2/contentModelFlags.test
index 84d41fc..b4f450a 100644
--- a/test/data/tokeniser2/contentModelFlags.test
+++ b/test/data/tokeniser2/contentModelFlags.test
@@ -2,34 +2,49 @@
{"description":"PLAINTEXT content model flag",
"contentModelFlags":["PLAINTEXT"],
+"lastStartTag":"plaintext",
"input":"<head>&body;",
"output":[["Character", "<head>&body;"]]},
{"description":"End tag closing RCDATA or CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"bar",
-"input":"foo</bar>",
-"output":[["Character", "foo"], ["EndTag", "bar"]]},
+"lastStartTag":"pre",
+"input":"foo</pre>",
+"output":[["Character", "foo"], ["EndTag", "pre"]]},
+
+{"description":"End tag closing RCDATA or CDATA (case-insensitivity)",
+"contentModelFlags":["RCDATA", "CDATA"],
+"lastStartTag":"pre",
+"input":"foo</pRe>",
+"output":[["Character", "foo"], ["EndTag", "pre"]]},
{"description":"End tag with incorrect name in RCDATA or CDATA",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"baz",
-"input":"</foo>bar</baz>",
-"output":["ParseError", ["Character", "</foo>bar"], ["EndTag", "baz"]]},
+"lastStartTag":"pre",
+"input":"</foo>bar</pre>",
+"output":[["Character", "</foo>bar"], ["EndTag", "pre"]]},
+
+{"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>"]]},
{"description":"End tag closing RCDATA or CDATA, switching back to PCDATA",
"contentModelFlags":["RCDATA", "CDATA"],
-"lastStartTag":"bar",
-"input":"foo</bar></baz>",
-"output":[["Character", "foo"], ["EndTag", "bar"], ["EndTag", "baz"]]},
+"lastStartTag":"pre",
+"input":"foo</pre></baz>",
+"output":[["Character", "foo"], ["EndTag", "pre"], ["EndTag", "baz"]]},
{"description":"CDATA w/ something looking like an entity",
"contentModelFlags":["CDATA"],
+"lastStartTag":"pre",
"input":"&foo;",
"output":[["Character", "&foo;"]]},
{"description":"RCDATA w/ an entity",
"contentModelFlags":["RCDATA"],
+"lastStartTag":"textarea",
"input":"&lt;",
"output":[["Character", "<"]]}