diff options
Diffstat (limited to 'tests/unicode')
-rw-r--r-- | tests/unicode/data/utf-8_2.txt | 1 | ||||
-rw-r--r-- | tests/unicode/file2.py | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/unicode/data/utf-8_2.txt b/tests/unicode/data/utf-8_2.txt index ab0eaa4e0d..6f142974e7 100644 --- a/tests/unicode/data/utf-8_2.txt +++ b/tests/unicode/data/utf-8_2.txt @@ -1 +1,2 @@ aαbβcγdδ +ぁ🙐 diff --git a/tests/unicode/file2.py b/tests/unicode/file2.py index b8a3419660..8c45f91faf 100644 --- a/tests/unicode/file2.py +++ b/tests/unicode/file2.py @@ -10,6 +10,16 @@ def do(mode): print(f.read(1)) print(f.read(2)) print(f.read(4)) + + # skip to end of line + f.readline() + + # check 3-byte utf-8 char + print(f.read(1 if mode == 'rt' else 3)) + + # check 4-byte utf-8 char + print(f.read(1 if mode == 'rt' else 4)) + f.close() do('rb') |