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-nl.spec b/hunspell-nl.spec index deb7e80..fa9118f 100644 --- a/hunspell-nl.spec +++ b/hunspell-nl.spec @@ -1,12 +1,13 @@ -%if 0%{?fedora} > 35 +%if 0%{?fedora} >= 36 || 0%{?rhel} > 9 %global dict_dirname hunspell %else %global dict_dirname myspell %endif + Name: hunspell-nl Summary: Dutch hunspell dictionaries Version: 2.20.19 -Release: 13%{?dist} +Release: 14%{?dist} Source: https://github.com/OpenTaal/opentaal-hunspell/archive/2.20.19.tar.gz URL: https://opentaal.org/ License: BSD-3-Clause OR CC-BY-3.0 @@ -41,6 +42,10 @@ done %{_datadir}/%{dict_dirname}/* %changelog +* Sun Aug 04 2024 Parag Nemade - 2.20.19-14 +- Resolves:RHEL-52797 - Add conditional for RHEL for using hunspell directory +- Add tmt CI tests + * Mon Jun 24 2024 Troy Dawson - 2.20.19-13 - Bump release for June 2024 mass rebuild diff --git a/plans/hunspell-nl.fmf b/plans/hunspell-nl.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/hunspell-nl.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..6ff5fd6 --- /dev/null +++ b/tests/test_dic_availability.fmf @@ -0,0 +1,6 @@ +require: +- python3-enchant +- hunspell-nl +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..11a67d9 --- /dev/null +++ b/tests/test_dic_availability.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import enchant + +lang = "nso_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..2becde3 --- /dev/null +++ b/tests/test_suggest_words.fmf @@ -0,0 +1,6 @@ +require: +- python3-enchant +- hunspell-nl +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..4cb20d2 --- /dev/null +++ b/tests/test_suggest_words.py @@ -0,0 +1,9 @@ +#!/usr/bin/python3 + +import enchant + +wdlst = [ "Hal", "the", "ochte"] +dic = enchant.Dict("nl_NL") +for wd in wdlst: + dic.check(wd) + print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))