summaryrefslogtreecommitdiffstatshomepage
path: root/tests/unicode/file2.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-29 14:56:09 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-29 14:56:09 +0000
commit92ab95f21539d94c2139974b3995699a155f5a97 (patch)
treefb1e917f68ec818edf3ba65753427682c4f51970 /tests/unicode/file2.py
parent598af3a7d6bab1f106f6969ebab2d6f4e11ee963 (diff)
downloadmicropython-92ab95f21539d94c2139974b3995699a155f5a97.tar.gz
micropython-92ab95f21539d94c2139974b3995699a155f5a97.zip
tests: Add some tests to improve coverage.
Diffstat (limited to 'tests/unicode/file2.py')
-rw-r--r--tests/unicode/file2.py10
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')