Skip to content

Commit f06aecd

Browse files
authored
Merge pull request #1 from diervo/dval/parseErrorTagName
Adding tests for Tag Name parse errors
2 parents 586f2dd + 924515f commit f06aecd

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

tokenizer/test3.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4985,7 +4985,10 @@
49854985

49864986
{"description":"<a\\u0000>",
49874987
"input":"<a\u0000>",
4988-
"output":["ParseError", ["StartTag", "a\uFFFD", {}]]},
4988+
"output":["ParseError", ["StartTag", "a\uFFFD", {}]],
4989+
"errors":[
4990+
{ "code": "unexpected-null-character", "line": 1, "col": 3 }
4991+
]},
49894992

49904993
{"description":"<a\\u0008>",
49914994
"input":"<a\u0008>",

tokenizer/test4.test

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,10 @@
331331

332332
{"description":"EOF in tag name state ",
333333
"input":"<a",
334-
"output":["ParseError"]},
335-
336-
{"description":"EOF in tag name state",
337-
"input":"<a",
338-
"output":["ParseError"]},
334+
"output":["ParseError"],
335+
"errors": [
336+
{ "code": "eof-in-tag-name", "line": 1, "col": 3 }
337+
]},
339338

340339
{"description":"EOF in before attribute name state",
341340
"input":"<a ",

tree-construction/webkit01.dat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Test
3434
#errors
3535
(1,3): eof-in-tag-name
3636
(1,3): expected-doctype-but-got-eof
37+
#new-errors
38+
(1:4) eof-in-tag-name
3739
#document
3840
| <html>
3941
| <head>

0 commit comments

Comments
 (0)