Resolves:RHEL-52498 - Add conditional for RHEL for using hunspell directory

Add tmt CI tests
This commit is contained in:
Parag Nemade 2024-08-12 13:49:33 +05:30
parent e5c1f9dc0d
commit be9c2fcc32
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
7 changed files with 43 additions and 2 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -1,4 +1,4 @@
%if 0%{?fedora} > 35
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%global dict_dirname hunspell
%else
%global dict_dirname myspell
@ -6,7 +6,7 @@
Name: hunspell-qu
Summary: Quechua Ecuador hunspell dictionaries
Version: 0.9
Release: 29%{?dist}
Release: 30%{?dist}
# Following links is dead now
Source: http://extensions.services.openoffice.org/e-files/2121/8/qu_EC-0.9.oxt
URL: http://extensions.services.openoffice.org/project/KichwaSpellchecker
@ -35,6 +35,10 @@ cp -p qu_EC.aff qu_EC.dic $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
%{_datadir}/%{dict_dirname}/*
%changelog
* Mon Aug 12 2024 Parag Nemade <pnemade AT redhat DOT com> - 0.9-30
- Resolves:RHEL-52498 - Add conditional for RHEL for using hunspell directory
- Add tmt CI tests
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.9-29
- Bump release for June 2024 mass rebuild

5
plans/hunspell-qu.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

View File

@ -0,0 +1,6 @@
require:
- python3-enchant
- hunspell-qu
test: python3 test_dic_availability.py
framework: shell

View File

@ -0,0 +1,10 @@
#!/usr/bin/python3
import enchant
lang = "qu_EC"
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")

View File

@ -0,0 +1,6 @@
require:
- python3-enchant
- hunspell-qu
test: python3 test_suggest_words.py
framework: shell

View File

@ -0,0 +1,9 @@
#!/usr/bin/python3
import enchant
wdlst = [ "allinllac", "te", "tutap"]
dic = enchant.Dict("qu_EC")
for wd in wdlst:
dic.check(wd)
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))