Resolves:RHEL-52500 - Add conditional for RHEL for using hunspell directory
Add tmt CI tests
This commit is contained in:
parent
80a4fca4b7
commit
3f620e35ad
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
@ -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-ro
|
||||
Summary: Romanian hunspell dictionaries
|
||||
Version: 3.3.10
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Source: http://downloads.sourceforge.net/rospell/ro_RO.%{version}.zip
|
||||
URL: http://rospell.sourceforge.net/
|
||||
License: GPL-2.0-or-later OR LGPL-2.1-or-later OR MPL-1.1
|
||||
@ -33,6 +33,10 @@ cp -p ro_RO.* $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
|
||||
%{_datadir}/%{dict_dirname}/*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 12 2024 Parag Nemade <pnemade AT redhat DOT com> - 3.3.10-9
|
||||
- Resolves:RHEL-52500 - Add conditional for RHEL for using hunspell directory
|
||||
- Add tmt CI tests
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.3.10-8
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
|
5
plans/hunspell-ro.fmf
Normal file
5
plans/hunspell-ro.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-ro
|
||||
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 = "ro_RO"
|
||||
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-ro
|
||||
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 = [ "Buna ziu", "ceai", "diminea"]
|
||||
dic = enchant.Dict("ro_RO")
|
||||
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