aboutsummaryrefslogtreecommitdiff
path: root/tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test
diff options
context:
space:
mode:
authorMarkus Unterwaditzer <markus-honeypot@unterwaditzer.net>2021-11-24 20:44:08 +0100
committerMarkus Unterwaditzer <markus-honeypot@unterwaditzer.net>2021-11-24 20:51:21 +0100
commit9909fc4580855a58a10eb84f0d143d1b3b3f464a (patch)
tree36941a6a714a10b9ce554ba249975108e6a17274 /tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test
hello world
Diffstat (limited to 'tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test')
-rw-r--r--tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test b/tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test
new file mode 100644
index 0000000..3ddb96c
--- /dev/null
+++ b/tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test
@@ -0,0 +1,41 @@
+{"tests" : [
+{"description": "Invalid Unicode character U+DFFF",
+"doubleEscaped":true,
+"input": "\\uDFFF",
+"output":[["Character", "\\uDFFF"]],
+"errors":[
+ { "code": "surrogate-in-input-stream", "line": 1, "col": 1 }
+]},
+
+{"description": "Invalid Unicode character U+D800",
+"doubleEscaped":true,
+"input": "\\uD800",
+"output":[["Character", "\\uD800"]],
+"errors":[
+ { "code": "surrogate-in-input-stream", "line": 1, "col": 1 }
+]},
+
+{"description": "Invalid Unicode character U+DFFF with valid preceding character",
+"doubleEscaped":true,
+"input": "a\\uDFFF",
+"output":[["Character", "a\\uDFFF"]],
+"errors":[
+ { "code": "surrogate-in-input-stream", "line": 1, "col": 2 }
+]},
+
+{"description": "Invalid Unicode character U+D800 with valid following character",
+"doubleEscaped":true,
+"input": "\\uD800a",
+"output":[["Character", "\\uD800a"]],
+"errors":[
+ { "code": "surrogate-in-input-stream", "line": 1, "col": 1 }
+]},
+
+{"description":"CR followed by U+0000",
+"input":"\r\u0000",
+"output":[["Character", "\n\u0000"]],
+"errors":[
+ { "code": "unexpected-null-character", "line": 2, "col": 1 }
+]}
+]
+} \ No newline at end of file