Resolves:RHEL-52482 - Add conditional for RHEL for using hunspell directory
Add tmt CI tests
This commit is contained in:
parent
108938cced
commit
54f1531139
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -1,9 +1,13 @@
|
|||||||
|
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
|
||||||
%global dict_dirname hunspell
|
%global dict_dirname hunspell
|
||||||
|
%else
|
||||||
|
%global dict_dirname myspell
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: hunspell-ga
|
Name: hunspell-ga
|
||||||
Summary: Irish hunspell dictionaries
|
Summary: Irish hunspell dictionaries
|
||||||
Version: 5.1
|
Version: 5.1
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Source: https://github.com/kscanne/gaelspell/releases/download/v%{version}/hunspell-ga-%{version}.zip
|
Source: https://github.com/kscanne/gaelspell/releases/download/v%{version}/hunspell-ga-%{version}.zip
|
||||||
URL: https://cadhan.com/gaelspell/
|
URL: https://cadhan.com/gaelspell/
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
@ -32,6 +36,10 @@ cp -p ga_IE.dic ga_IE.aff $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
|
|||||||
%{_datadir}/%{dict_dirname}/*
|
%{_datadir}/%{dict_dirname}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Aug 04 2024 Parag Nemade <pnemade AT redhat DOT com> - 5.1-7
|
||||||
|
- Resolves:RHEL-52482 - Add conditional for RHEL for using hunspell directory
|
||||||
|
- Add tmt CI tests
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.1-6
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.1-6
|
||||||
- Bump release for June 2024 mass rebuild
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
|
5
plans/hunspell-ga.fmf
Normal file
5
plans/hunspell-ga.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-ga
|
||||||
|
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 = "ga_IE"
|
||||||
|
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-ga
|
||||||
|
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 = [ "dhit", "ca", "maid"]
|
||||||
|
dic = enchant.Dict("ga_IE")
|
||||||
|
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