Expand parser and Unicode test coverage
This commit is contained in:
89
test/testdata/invalid-unicode
vendored
Normal file
89
test/testdata/invalid-unicode
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
<EFBFBD>
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 0
|
||||
========
|
||||
["<22> <-- invalid UTF-8"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 2
|
||||
========
|
||||
[<5B>]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 1
|
||||
========
|
||||
[a<>]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 2
|
||||
========
|
||||
["\u<>"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 4
|
||||
========
|
||||
["\<5C>"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 3
|
||||
========
|
||||
[0<>]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 2
|
||||
========
|
||||
[123<32>]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 4
|
||||
========
|
||||
[1e<31>]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 3
|
||||
========
|
||||
[1e1<65>]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe5 at position 4
|
||||
========
|
||||
["<22>"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0x81 at position 2
|
||||
========
|
||||
["<22>"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xc1 at position 2
|
||||
========
|
||||
["<22>"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xfd at position 2
|
||||
========
|
||||
["<22><><EFBFBD><EFBFBD>"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xf4 at position 2
|
||||
========
|
||||
["<22><><EFBFBD> <-- overlong encoding"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe0 at position 2
|
||||
========
|
||||
["<22><><EFBFBD><EFBFBD> <-- overlong encoding"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xf0 at position 2
|
||||
========
|
||||
["<22><> <-- truncated UTF-8"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xe0 at position 2
|
||||
========
|
||||
["<22><><EFBFBD> <-- encoded surrogate half"]
|
||||
====
|
||||
-1
|
||||
unable to decode byte 0xed at position 2
|
||||
Reference in New Issue
Block a user