summaryrefslogtreecommitdiff
path: root/test/data/tokeniser2/test4.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/test4.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/test4.test')
-rw-r--r--test/data/tokeniser2/test4.test24
1 files changed, 18 insertions, 6 deletions
diff --git a/test/data/tokeniser2/test4.test b/test/data/tokeniser2/test4.test
index 0f6d12c..ec8f72c 100644
--- a/test/data/tokeniser2/test4.test
+++ b/test/data/tokeniser2/test4.test
@@ -18,7 +18,7 @@
{"description":"== attribute",
"input":"<z ==>",
-"output":["ParseError", ["StartTag", "z", {"=": ""}]]},
+"output":["ParseError", "ParseError", ["StartTag", "z", {"=": ""}]]},
{"description":"=== attribute",
"input":"<z ===>",
@@ -48,6 +48,10 @@
"input":"<z z='&xlink_xmlns;'>bar<z>",
"output":["ParseError",["StartTag","z",{"z":"&xlink_xmlns;"}],["Character","bar"],["StartTag","z",{}]]},
+{"description":"Text after hex character reference",
+"input":"<z z='&#x0020; foo'>bar<z>",
+"output":[["StartTag","z",{"z":" foo"}],["Character","bar"],["StartTag","z",{}]]},
+
{"description":"Attribute name starting with \"",
"input":"<foo \"='bar'>",
"output":["ParseError", ["StartTag", "foo", {"\"": "bar"}]]},
@@ -96,6 +100,10 @@
"input":"<z\r",
"output":["ParseError", ["StartTag", "z", {}]]},
+{"description":"Slash EOF in tag name",
+"input":"<z/",
+"output":["ParseError", ["StartTag", "z", {}]]},
+
{"description":"Zero hex numeric entity",
"input":"&#x0",
"output":["ParseError", "ParseError", ["Character", "\uFFFD"]]},
@@ -198,19 +206,19 @@
{"description":"Doctype public case-sensitivity (1)",
"input":"<!DoCtYpE HtMl PuBlIc \"AbC\" \"XyZ\">",
-"output":[["DOCTYPE", "HtMl", "AbC", "XyZ", true]]},
+"output":[["DOCTYPE", "html", "AbC", "XyZ", true]]},
{"description":"Doctype public case-sensitivity (2)",
"input":"<!dOcTyPe hTmL pUbLiC \"aBc\" \"xYz\">",
-"output":[["DOCTYPE", "hTmL", "aBc", "xYz", true]]},
+"output":[["DOCTYPE", "html", "aBc", "xYz", true]]},
{"description":"Doctype system case-sensitivity (1)",
"input":"<!DoCtYpE HtMl SyStEm \"XyZ\">",
-"output":[["DOCTYPE", "HtMl", null, "XyZ", true]]},
+"output":[["DOCTYPE", "html", null, "XyZ", true]]},
{"description":"Doctype system case-sensitivity (2)",
"input":"<!dOcTyPe hTmL sYsTeM \"xYz\">",
-"output":[["DOCTYPE", "hTmL", null, "xYz", true]]},
+"output":[["DOCTYPE", "html", null, "xYz", true]]},
{"description":"U+0000 in lookahead region after non-matching character",
"input":"<!doc>\u0000",
@@ -288,6 +296,10 @@
{"description":"Doctype sys",
"input":"<!DOCTYPE html SYS",
-"output":["ParseError", ["DOCTYPE", "html", null, null, false]]}
+"output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
+
+{"description":"Doctype html x>text",
+"input":"<!DOCTYPE html x>text",
+"output":["ParseError", ["DOCTYPE", "html", null, null, false], ["Character", "text"]]}
]}