Add tmt CI tests
This commit is contained in:
parent
7be0c4ec43
commit
d9010198cf
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
5
plans/hunspell-ti.fmf
Normal file
5
plans/hunspell-ti.fmf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
6
tests/test_dic_availability.fmf
Normal file
6
tests/test_dic_availability.fmf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
require:
|
||||||
|
- python3-enchant
|
||||||
|
- hunspell-ti
|
||||||
|
test: python3 test_dic_availability.py
|
||||||
|
framework: shell
|
||||||
|
|
10
tests/test_dic_availability.py
Normal file
10
tests/test_dic_availability.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import enchant
|
||||||
|
|
||||||
|
lang = "ti_ER"
|
||||||
|
try:
|
||||||
|
dic = enchant.request_dict(lang)
|
||||||
|
print("Dictionary for {0} language is available for use".format(lang))
|
||||||
|
except enchant.errors.DictNotFoundError:
|
||||||
|
print("Dictionary is not installed for use")
|
6
tests/test_suggest_words.fmf
Normal file
6
tests/test_suggest_words.fmf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
require:
|
||||||
|
- python3-enchant
|
||||||
|
- hunspell-ti
|
||||||
|
test: python3 test_suggest_words.py
|
||||||
|
framework: shell
|
||||||
|
|
9
tests/test_suggest_words.py
Normal file
9
tests/test_suggest_words.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import enchant
|
||||||
|
|
||||||
|
wdlst = [ "ሰላም", "ሻሂ", "ጉሓት"]
|
||||||
|
dic = enchant.Dict("ti_ER")
|
||||||
|
for wd in wdlst:
|
||||||
|
dic.check(wd)
|
||||||
|
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))
|
Loading…
Reference in New Issue
Block a user