diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/hunspell-st.spec b/hunspell-st.spec index 0bc61ca..7066689 100644 --- a/hunspell-st.spec +++ b/hunspell-st.spec @@ -1,4 +1,4 @@ -%if 0%{?fedora} > 35 +%if 0%{?fedora} >= 36 || 0%{?rhel} > 9 %global dict_dirname hunspell %else %global dict_dirname myspell @@ -7,7 +7,7 @@ Name: hunspell-st Summary: Southern Sotho hunspell dictionaries %global upstreamid 20091030 Version: 0.%{upstreamid} -Release: 30%{?dist} +Release: 31%{?dist} Source: https://downloads.sourceforge.net/project/aoo-extensions/3138/0/dict-st_za-2009.10.30.oxt URL: http://www.translate.org.za/ License: LGPL-2.1-or-later @@ -44,6 +44,10 @@ cp -p *.dic *.aff $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname} %{_datadir}/%{dict_dirname}/* %changelog +* Mon Aug 12 2024 Parag Nemade - 0.20091030-31 +- Resolves:RHEL-52514 - Add conditional for RHEL for using hunspell directory +- Add tmt CI tests + * Mon Jun 24 2024 Troy Dawson - 0.20091030-30 - Bump release for June 2024 mass rebuild diff --git a/plans/hunspell-st.fmf b/plans/hunspell-st.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/hunspell-st.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/test_dic_availability.fmf b/tests/test_dic_availability.fmf new file mode 100644 index 0000000..8b19528 --- /dev/null +++ b/tests/test_dic_availability.fmf @@ -0,0 +1,6 @@ +require: +- python3-enchant +- hunspell-st +test: python3 test_dic_availability.py +framework: shell + diff --git a/tests/test_dic_availability.py b/tests/test_dic_availability.py new file mode 100644 index 0000000..c4aa3de --- /dev/null +++ b/tests/test_dic_availability.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import enchant + +lang = "st_ZA" +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") diff --git a/tests/test_suggest_words.fmf b/tests/test_suggest_words.fmf new file mode 100644 index 0000000..f80061e --- /dev/null +++ b/tests/test_suggest_words.fmf @@ -0,0 +1,6 @@ +require: +- python3-enchant +- hunspell-st +test: python3 test_suggest_words.py +framework: shell + diff --git a/tests/test_suggest_words.py b/tests/test_suggest_words.py new file mode 100644 index 0000000..c51bb10 --- /dev/null +++ b/tests/test_suggest_words.py @@ -0,0 +1,9 @@ +#!/usr/bin/python3 + +import enchant + +wdlst = [ "Hall", "tee", "hoseng"] +dic = enchant.Dict("st_ZA") +for wd in wdlst: + dic.check(wd) + print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))