tests/unicode: Add test for invalid utf-8 file contents.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2022-08-24 12:42:45 +10:00 committed by Damien George
parent 6c3d8d38bf
commit bd4e45fd68
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1 @@
aa<EFBFBD>bb

View File

@ -0,0 +1,5 @@
try:
f = open("unicode/data/utf-8_invalid.txt", encoding="utf-8")
f.read()
except UnicodeError:
print("UnicodeError")