fix git support for v1.5.3 (or higher) by setting "--work-tree"
[translate_toolkit.git] / lang / test_ko.py
blob8d6e43102d99acb40c4b2e10839951272f594a16
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 from translate.lang import factory
6 def test_punctranslate():
7 """Tests that we can translate punctuation."""
8 language = factory.getlanguage('ko')
9 # Nothing should be translated
10 assert language.punctranslate(u"abc efg") == u"abc efg"
11 assert language.punctranslate(u"abc efg.") == u"abc efg."
12 assert language.punctranslate(u"abc efg. hij.") == u"abc efg. hij."
13 assert language.punctranslate(u"abc efg!") == u"abc efg!"
14 assert language.punctranslate(u"abc efg? hij!") == u"abc efg? hij!"
15 assert language.punctranslate(u"Delete file: %s?") == u"Delete file: %s?"
17 def test_sentences():
18 """Tests basic functionality of sentence segmentation."""
19 language = factory.getlanguage('ko')
20 sentences = language.sentences(u"이 연락처에 바뀐 부분이 있습니다. 바뀐 사항을 저장하시겠습니까?")
21 print sentences
22 assert sentences == [u"이 연락처에 바뀐 부분이 있습니다.", u"바뀐 사항을 저장하시겠습니까?"]