diff options
Diffstat (limited to 'tests/unicode/file2.py')
-rw-r--r-- | tests/unicode/file2.py | 10 |
1 files changed, 10 insertions, 0 deletions
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') |