tests/unicode: Add test for invalid utf-8 file contents.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
6c3d8d38bf
commit
bd4e45fd68
|
@ -0,0 +1 @@
|
|||
aa<EFBFBD>bb
|
|
@ -0,0 +1,5 @@
|
|||
try:
|
||||
f = open("unicode/data/utf-8_invalid.txt", encoding="utf-8")
|
||||
f.read()
|
||||
except UnicodeError:
|
||||
print("UnicodeError")
|
Loading…
Reference in New Issue