aboutsummaryrefslogtreecommitdiff
path: root/tests/html5lib-tests/tokenizer/unicodeCharsProblematic.test
diff options
context:
space:
mode:
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