Skip to content

Commit 9d57d40

Browse files
committed
add tests from PR #700
1 parent f4c28c6 commit 9d57d40

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/glossary_v2_test.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,27 @@ def test_lang_detect_5(self):
584584
("English", "German"),
585585
)
586586

587+
def test_lang_detect_6(self):
588+
glos = self.glos = Glossary()
589+
glos.setInfo("name", "Church Slavonic-deu.index")
590+
glos.detectLangsFromName()
591+
print(glos.sourceLangName)
592+
# ("Church Slavonic", "German"),
593+
self.assertEqual(
594+
(glos.sourceLangName, glos.targetLangName),
595+
("", ""),
596+
)
597+
598+
# FIXME: should be either ("", "") or ("Fijian", "German")
599+
def test_lang_detect_7(self):
600+
glos = self.glos = Glossary()
601+
glos.setInfo("name", "Na vosa vaka-Viti-deu.index")
602+
glos.detectLangsFromName()
603+
self.assertEqual(
604+
(glos.sourceLangName, glos.targetLangName),
605+
("Nauruan", "German"),
606+
)
607+
587608
def convert_to_txtZip(
588609
self,
589610
fname, # input file with extension

0 commit comments

Comments
 (0)