summaryrefslogtreecommitdiff
path: root/test/data/tokeniser2/test4.test
diff options
context:
space:
mode:
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"]]}
]}