summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tc_utfwidth.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tc_utfwidth.py b/test/tc_utfwidth.py
index fba9f783..0288c17b 100644
--- a/test/tc_utfwidth.py
+++ b/test/tc_utfwidth.py
@@ -29,6 +29,11 @@ a_katakana = "ア"  # width = 2, bytes = 3
 # need one with width = 1 & bytes = 3
 
 class Test(TestCase):
+	def test_utf_byte_length(self):
+		self.assertEqual(1, utf_byte_length(a_ascii))
+		self.assertEqual(2, utf_byte_length(a_umlaut))
+		self.assertEqual(3, utf_byte_length(a_katakana))
+
 	def test_uwid(self):
 		self.assertEqual(1, uwid(a_ascii))
 		self.assertEqual(1, uwid(a_umlaut))
@@ -37,7 +42,5 @@ class Test(TestCase):
 		self.assertEqual(4, uwid("asdf"))
 		self.assertEqual(5, uwid("löööl"))
 		self.assertEqual(6, uwid("バババ"))
-		self.assertEqual(1, uwid("äsdf", count=1))
-		self.assertEqual(2, uwid("バババ", count=1))
 
 if __name__ == '__main__': main()
v1.5.1&id=b4c2c703f9acdf39cbd47407ed51a7e7c807ba7d'>b4c2c703 ^
ae57e587 ^




a66c4a26 ^

4d6c426f ^
5c210a96 ^
4072a34d ^
4d6c426f ^
a66c4a26 ^
3de15ddd ^
a66c4a26 ^


f027adc0 ^
5c210a96 ^

3de15ddd ^

5c210a96 ^
fb275079 ^

5c210a96 ^
3d566884 ^
a1d7ed6e ^
3d566884 ^
621a1a39 ^
9bc5d95c ^
c44b726e ^
465bff73 ^




f027adc0 ^
f8e96a97 ^

0b5c4cbe ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61