{"tests": [ {"description":"Doctype without a name", "input":"", "output":["ParseError", "ParseError", ["DOCTYPE", "", true]]}, {"description":"Correct doctype without a space before name", "input":"", "output":["ParseError", ["DOCTYPE", "HTML", false]]}, {"description":"Incorrect doctype without a space before name", "input":"", "output":["ParseError", ["DOCTYPE", "FOO", true]]}, {"description":"Bogus doctype", "input":"", "output":["ParseError", ["DOCTYPE", "HTML", true]]}, {"description":"Incomplete doctype", "input":"", "output":["ParseError", ["StartTag", "h", { "a":"&" }]]}, {"description":"StartTag containing <", "input":"", "output":["ParseError", ["StartTag", "a", { }], ["StartTag", "b", { }]]}, {"description":"Non-void element containing trailing /", "input":"", "output":["ParseError", ["StartTag", "h", { }]]}, {"description":"Void element with permitted slash", "input":"
", "output":[["StartTag", "br", { }]]}, {"description":"StartTag containing /", "input":"", "output":["ParseError", ["StartTag", "h", { "a":"b" }]]}, {"description":"Double-quoted attribute value", "input":"", "output":[["StartTag", "h", { "a":"b" }]]}, {"description":"Unescaped ", "output":["ParseError", ["Comment", "1"]]}, {"description":"Simili processing instruction", "input":"", "output":["ParseError", ["Comment", "?namespace"]]}, {"description":"A bogus comment stops at >, even if preceeded by two dashes", "input":"", "output":["ParseError", ["Comment", "?foo--"]]}, {"description":"Unescaped <", "input":"foo < bar", "output":[["Character", "foo "], "ParseError", ["Character", "< bar"]]}, /* jmb -- libjson uses C strings internally, thus the input gets truncated before the * data is fed to the input stream (and thus the tokeniser) {"description":"Null Byte Replacement", "input":"\u0000", "output":[["Character", "\ufffd"]]} */ ]}