summary refs log tree commit diff stats
path: root/test/tc_utfwidth.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-09-30 04:51:29 +0200
committerhut <hut@lavabit.com>2010-09-30 04:51:29 +0200
commit473daebb6870a54fe4b47529e77be698a2edfdb3 (patch)
treec79a19c727de9ef91649561a0e2994b39b592f56 /test/tc_utfwidth.py
parent8c8e7282b3b4238a3b7cf981d9e5715b11076419 (diff)
downloadranger-473daebb6870a54fe4b47529e77be698a2edfdb3.tar.gz
Revert 5 commits concerning utf (due to very poor performance)
This reverts commits:
8c8e7282b3b4238a3b7cf981d9e5715b11076419
5cb67eeb96d337b55deea20131fc44a3d5447251
512f386be8753775ec824a6d9cbaf6527d50eda4
d4900452fca51685349966d527d173fdefe83f08
e6dda13a71168f9ec4a1e4844edad5a3257803e9
Diffstat (limited to 'test/tc_utfwidth.py')
-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()