From 92ab95f21539d94c2139974b3995699a155f5a97 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 29 Jan 2015 14:56:09 +0000 Subject: tests: Add some tests to improve coverage. --- tests/unicode/data/utf-8_2.txt | 1 + tests/unicode/file2.py | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'tests/unicode') diff --git a/tests/unicode/data/utf-8_2.txt b/tests/unicode/data/utf-8_2.txt index ab0eaa4e0..6f142974e 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 b8a341966..8c45f91fa 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') -- cgit v1.2.3