diff --git a/tokenizer/numericEntities.test b/tokenizer/numericEntities.test index 36c82281..43de84b0 100644 --- a/tokenizer/numericEntities.test +++ b/tokenizer/numericEntities.test @@ -1,5 +1,41 @@ {"tests": [ +{"description": "Invalid unterminated numeric entity character overflow before EOF", +"input": "�", +"output": ["ParseError", "ParseError", ["Character", "\uFFFD"]]}, + +{"description": "Invalid unterminated numeric entity character overflow before EOF", +"input": "�", +"output": ["ParseError", "ParseError", ["Character", "\uFFFD"]]}, + +{"description": "Invalid unterminated numeric entity character overflow before EOF", +"input": "�", +"output": ["ParseError", "ParseError", ["Character", "\uFFFD"]]}, + +{"description": "Invalid unterminated numeric entity character overflow", +"input": "�x", +"output": ["ParseError", "ParseError", ["Character", "\uFFFDx"]]}, + +{"description": "Invalid unterminated numeric entity character overflow", +"input": "�x", +"output": ["ParseError", "ParseError", ["Character", "\uFFFDx"]]}, + +{"description": "Invalid unterminated numeric entity character overflow", +"input": "�x", +"output": ["ParseError", "ParseError", ["Character", "\uFFFDx"]]}, + +{"description": "Invalid numeric entity character overflow", +"input": "�", +"output": ["ParseError", ["Character", "\uFFFD"]]}, + +{"description": "Invalid numeric entity character overflow", +"input": "�", +"output": ["ParseError", ["Character", "\uFFFD"]]}, + +{"description": "Invalid numeric entity character overflow", +"input": "�", +"output": ["ParseError", ["Character", "\uFFFD"]]}, + {"description": "Invalid numeric entity character U+0000", "input": "�", "output": ["ParseError", ["Character", "\uFFFD"]]}, diff --git a/tree-construction/entities01.dat b/tree-construction/entities01.dat index 20d53a0f..b271f822 100644 --- a/tree-construction/entities01.dat +++ b/tree-construction/entities01.dat @@ -721,3 +721,72 @@ FOO�ZOO | | | "FOO�ZOO" + +#data +FOO� +#errors +(1,3): expected-doctype-but-got-chars +(1,13): illegal-codepoint-for-numeric-entity +(1,13): eof-in-numeric-entity +#document +| +| +| +| "FOO�" + +#data +FOO� +#errors +(1,3): expected-doctype-but-got-chars +(1,13): illegal-codepoint-for-numeric-entity +(1,13): eof-in-numeric-entity +#document +| +| +| +| "FOO�" + +#data +FOO� +#errors +(1,3): expected-doctype-but-got-chars +(1,13): illegal-codepoint-for-numeric-entity +(1,13): eof-in-numeric-entity +#document +| +| +| +| "FOO�" + +#data +FOO�ZOO +#errors +(1,3): expected-doctype-but-got-chars +(1,13): illegal-codepoint-for-numeric-entity +#document +| +| +| +| "FOO�ZOO" + +#data +FOO�ZOO +#errors +(1,3): expected-doctype-but-got-chars +(1,13): illegal-codepoint-for-numeric-entity +#document +| +| +| +| "FOO�ZOO" + +#data +FOO�ZOO +#errors +(1,3): expected-doctype-but-got-chars +(1,13): illegal-codepoint-for-numeric-entity +#document +| +| +| +| "FOO�ZOO"