summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-08 17:20:26 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-08 17:20:26 +0100
commitdf61e5c367ce0915bcedb4842bf8783cdd5b116b (patch)
treede4e959aac73711d7e61c1288caffc38d03b2a75 /tests
parentf14545082062c204dab2504d5e51e7adb9ee1fe5 (diff)
parent8565c4c13d454819550744672e566bac6714f6c3 (diff)
downloadpykolab-df61e5c367ce0915bcedb4842bf8783cdd5b116b.tar.gz
Merge branch 'master' of ssh://git.kolab.org/git/pykolab
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test-010-transliterate.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/unit/test-010-transliterate.py b/tests/unit/test-010-transliterate.py
index 7f70700..3c98a1a 100644
--- a/tests/unit/test-010-transliterate.py
+++ b/tests/unit/test-010-transliterate.py
@@ -59,6 +59,45 @@ class TestTransliteration(unittest.TestCase):
self.assertEqual('Alvaro', utils.translate(givenname, preferredlanguage))
self.assertEqual('Fuentes', utils.translate(surname, preferredlanguage))
+ def test_005_raw_ru_RU(self):
+ from pykolab import utils
+ givenname = r'Николай'
+ surname = r'Римский-Корсаков'
+
+ preferredlanguage = 'ru_RU'
+
+ self.assertEqual('Nikolaj', utils.translate(givenname, preferredlanguage))
+ self.assertEqual('Rimskij-Korsakov', utils.translate(surname, preferredlanguage))
+
+ def test_006_unicode_ru_RU(self):
+ from pykolab import utils
+ givenname = u'Николай'
+ surname = u'Римский-Корсаков'
+
+ preferredlanguage = 'ru_RU'
+
+ self.assertEqual('Nikolaj', utils.translate(givenname, preferredlanguage))
+ self.assertEqual('Rimskij-Korsakov', utils.translate(surname, preferredlanguage))
+
+ def test_007_raw_ru_RU(self):
+ from pykolab import utils
+ givenname = r'Юлия'
+ surname = r'Ёлкина'
+
+ preferredlanguage = 'ru_RU'
+
+ self.assertEqual('Yuliya', utils.translate(givenname, preferredlanguage))
+ self.assertEqual('Yolkina', utils.translate(surname, preferredlanguage))
+
+ def test_008_unicode_ru_RU(self):
+ from pykolab import utils
+ givenname = u'Юлия'
+ surname = u'Ёлкина'
+
+ preferredlanguage = 'ru_RU'
+
+ self.assertEqual('Yuliya', utils.translate(givenname, preferredlanguage))
+ self.assertEqual('Yolkina', utils.translate(surname, preferredlanguage))
if __name__ == '__main__':
unittest.main()