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

Add tmt CI tests
This commit is contained in:
Parag Nemade 2024-08-05 11:08:18 +05:30
parent 108938cced
commit 54f1531139
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
7 changed files with 46 additions and 1 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -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
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-ga
test: python3 test_dic_availability.py
framework: shell

View 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")

View File

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

View 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)))