From 7b30a5520cfb56e651f0eb4da85a3e07747da7dc Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 23 Jun 2007 22:40:25 +0000 Subject: Import hubbub -- an HTML parsing library. Plenty of work still to do (like tree generation ;) svn path=/trunk/hubbub/; revision=3359 --- test/data/tokeniser2/contentModelFlags.test | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/data/tokeniser2/contentModelFlags.test (limited to 'test/data/tokeniser2/contentModelFlags.test') diff --git a/test/data/tokeniser2/contentModelFlags.test b/test/data/tokeniser2/contentModelFlags.test new file mode 100644 index 0000000..84d41fc --- /dev/null +++ b/test/data/tokeniser2/contentModelFlags.test @@ -0,0 +1,36 @@ +{"tests": [ + +{"description":"PLAINTEXT content model flag", +"contentModelFlags":["PLAINTEXT"], +"input":"&body;", +"output":[["Character", "&body;"]]}, + +{"description":"End tag closing RCDATA or CDATA", +"contentModelFlags":["RCDATA", "CDATA"], +"lastStartTag":"bar", +"input":"foo", +"output":[["Character", "foo"], ["EndTag", "bar"]]}, + +{"description":"End tag with incorrect name in RCDATA or CDATA", +"contentModelFlags":["RCDATA", "CDATA"], +"lastStartTag":"baz", +"input":"bar", +"output":["ParseError", ["Character", "bar"], ["EndTag", "baz"]]}, + +{"description":"End tag closing RCDATA or CDATA, switching back to PCDATA", +"contentModelFlags":["RCDATA", "CDATA"], +"lastStartTag":"bar", +"input":"foo", +"output":[["Character", "foo"], ["EndTag", "bar"], ["EndTag", "baz"]]}, + +{"description":"CDATA w/ something looking like an entity", +"contentModelFlags":["CDATA"], +"input":"&foo;", +"output":[["Character", "&foo;"]]}, + +{"description":"RCDATA w/ an entity", +"contentModelFlags":["RCDATA"], +"input":"<", +"output":[["Character", "<"]]} + +]} -- cgit v1.2.3