Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tokenizer/test1.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
"output":[["DOCTYPE", "html", null, null, true]]},

{"description":"Correct Doctype mixed case",
"input":"<!DOCTYPE HtMl>",
"input":"<!DOCTYPE HtMl>",
"output":[["DOCTYPE", "html", null, null, true]]},

{"description":"Correct Doctype case with EOF",
"input":"<!DOCTYPE HtMl",
"input":"<!DOCTYPE HtMl",
"output":[["DOCTYPE", "html", null, null, false]],
"errors":[
{ "code": "eof-in-doctype", "line": 1, "col": 15 }
]},

{"description":"Truncated doctype start",
"input":"<!DOC>",
"input":"<!DOC>",
"output":[["Comment", "DOC"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"Doctype in error",
"input":"<!DOCTYPE foo>",
"input":"<!DOCTYPE foo>",
"output":[["DOCTYPE", "foo", null, null, true]]},

{"description":"Single Start Tag",
Expand Down Expand Up @@ -110,7 +110,7 @@
"input":"<!-",
"output":[["Comment", "-"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"Short comment",
Expand Down
66 changes: 33 additions & 33 deletions tokenizer/test3.test
Original file line number Diff line number Diff line change
Expand Up @@ -134,85 +134,85 @@
"input":"<!",
"output":[["Comment", ""]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\\u0000",
"input":"<!\u0000",
"output":[["Comment", "\uFFFD"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\\u0009",
"input":"<!\u0009",
"output":[["Comment", "\u0009"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\\u000A",
"input":"<!\u000A",
"output":[["Comment", "\u000A"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\\u000B",
"input":"<!\u000B",
"output":[["Comment", "\u000B"]],
"errors":[
{ "code": "control-character-in-input-stream", "line": 1, "col": 3 },
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\\u000C",
"input":"<!\u000C",
"output":[["Comment", "\u000C"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<! ",
"input":"<! ",
"output":[["Comment", " "]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!!",
"input":"<!!",
"output":[["Comment", "!"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\"",
"input":"<!\"",
"output":[["Comment", "\""]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!&",
"input":"<!&",
"output":[["Comment", "&"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!'",
"input":"<!'",
"output":[["Comment", "'"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!-",
"input":"<!-",
"output":[["Comment", "-"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!--",
Expand Down Expand Up @@ -1451,77 +1451,77 @@
"input":"<!/",
"output":[["Comment", "/"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!0",
"input":"<!0",
"output":[["Comment", "0"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!1",
"input":"<!1",
"output":[["Comment", "1"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!9",
"input":"<!9",
"output":[["Comment", "9"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!<",
"input":"<!<",
"output":[["Comment", "<"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!=",
"input":"<!=",
"output":[["Comment", "="]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!>",
"input":"<!>",
"output":[["Comment", ""]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!?",
"input":"<!?",
"output":[["Comment", "?"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!@",
"input":"<!@",
"output":[["Comment", "@"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!A",
"input":"<!A",
"output":[["Comment", "A"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!B",
"input":"<!B",
"output":[["Comment", "B"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!DOCTYPE",
Expand Down Expand Up @@ -6590,7 +6590,7 @@
{ "code": "missing-whitespace-before-doctype-name", "line": 1, "col": 10 },
{ "code": "missing-whitespace-after-doctype-system-keyword", "line": 1, "col": 18 },
{ "code": "eof-in-doctype", "line": 1, "col": 20 }

]},

{"description":"<!DOCTYPEa SYSTEM\">",
Expand Down Expand Up @@ -8090,63 +8090,63 @@
"input":"<!Y",
"output":[["Comment", "Y"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!Z",
"input":"<!Z",
"output":[["Comment", "Z"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!`",
"input":"<!`",
"output":[["Comment", "`"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!a",
"input":"<!a",
"output":[["Comment", "a"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!b",
"input":"<!b",
"output":[["Comment", "b"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!y",
"input":"<!y",
"output":[["Comment", "y"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!z",
"input":"<!z",
"output":[["Comment", "z"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!{",
"input":"<!{",
"output":[["Comment", "{"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<!\\uDBC0\\uDC00",
"input":"<!\uDBC0\uDC00",
"output":[["Comment", "\uDBC0\uDC00"]],
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"<\"",
Expand Down
10 changes: 5 additions & 5 deletions tokenizer/test4.test
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
"output":[["Comment", "doc"], ["Character", "\u0000"]],
"ignoreErrorOrder":true,
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 },
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 },
{ "code": "unexpected-null-character", "line": 1, "col": 7 }
]},

Expand All @@ -376,15 +376,15 @@
"output":[["Comment", "doc\uFFFD"]],
"ignoreErrorOrder":true,
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 }
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 }
]},

{"description":"U+0080 in lookahead region",
"input":"<!doc\u0080",
"output":[["Comment", "doc\u0080"]],
"ignoreErrorOrder":true,
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 },
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 },
{ "code": "control-character-in-input-stream", "line": 1, "col": 6 }
]},

Expand All @@ -393,7 +393,7 @@
"output":[["Comment", "doc\uFDD1"]],
"ignoreErrorOrder":true,
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 },
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 },
{ "code": "undefined-character-in-input-stream", "line": 1, "col": 6 }
]},

Expand All @@ -402,7 +402,7 @@
"output":[["Comment", "doc\uD83F\uDFFF"]],
"ignoreErrorOrder":true,
"errors":[
{ "code": "malformed-comment", "line": 1, "col": 3 },
{ "code": "unsupported-markup-declaration", "line": 1, "col": 3 },
{ "code": "undefined-character-in-input-stream", "line": 1, "col": 6 }
]},

Expand Down
Binary file modified tree-construction/plain-text-unsafe.dat
Binary file not shown.
8 changes: 4 additions & 4 deletions tree-construction/tests1.dat
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ Line1<br>Line2<br>Line3<br>Line4
(1,2): expected-dashes-or-doctype
(1,2): expected-doctype-but-got-eof
#new-errors
(1:3) malformed-comment
(1:3) unsupported-markup-declaration
#document
| <!-- -->
| <html>
Expand All @@ -593,7 +593,7 @@ Line1<br>Line2<br>Line3<br>Line4
(1,2): expected-dashes-or-doctype
(1,3): expected-doctype-but-got-eof
#new-errors
(1:3) malformed-comment
(1:3) unsupported-markup-declaration
#document
| <!-- # -->
| <html>
Expand All @@ -619,7 +619,7 @@ Line1<br>Line2<br>Line3<br>Line4
(1,2): expected-dashes-or-doctype
(1,10): expected-doctype-but-got-eof
#new-errors
(1:3) malformed-comment
(1:3) unsupported-markup-declaration
#document
| <!-- COMMENT -->
| <html>
Expand Down Expand Up @@ -658,7 +658,7 @@ Line1<br>Line2<br>Line3<br>Line4
(1,2): expected-dashes-or-doctype
(1,12): expected-doctype-but-got-eof
#new-errors
(1:3) malformed-comment
(1:3) unsupported-markup-declaration
#document
| <!-- COM--MENT -->
| <html>
Expand Down
2 changes: 1 addition & 1 deletion tree-construction/tests26.dat
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
(1,28): expected-dashes-or-doctype
(1,34): expected-closing-tag-but-got-eof
#new-errors
(1:29) malformed-comment
(1:29) unsupported-markup-declaration
#document
| <!DOCTYPE html>
| <html>
Expand Down