diff options
Diffstat (limited to 'tests/unicode/file2.py')
-rw-r--r-- | tests/unicode/file2.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unicode/file2.py b/tests/unicode/file2.py new file mode 100644 index 0000000000..aca2e0e0ed --- /dev/null +++ b/tests/unicode/file2.py @@ -0,0 +1,12 @@ +# test reading a given number of characters + +def do(mode): + f = open('unicode/data/utf-8_2.txt', mode) + print(f.read(1)) + print(f.read(1)) + print(f.read(2)) + print(f.read(4)) + f.close() + +do('rb') +do('rt') |