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

Add tmt CI tests
This commit is contained in:
Parag Nemade 2024-08-02 15:59:27 +05:30
parent 839c20b084
commit bf3a53b4bf
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
5 changed files with 29 additions and 2 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -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-oc
Summary: Occitan hunspell dictionaries
Version: 1.5
Release: 4%{?dist}
Release: 5%{?dist}
Source: https://addons.mozilla.org/firefox/downloads/file/4085695/diccionari_occitan_lengadocian-%{version}.xpi
URL: https://addons.mozilla.org/en-US/firefox/addon/diccionari-occitan-lengadocian/
# https://www.mozilla.org/en-US/MPL/2.0/combining-mpl-and-gpl/
@ -35,6 +36,10 @@ cp -p dictionaries/oc_FR.aff dictionaries/oc_FR.dic $RPM_BUILD_ROOT/%{_datadir}/
%{_datadir}/%{dict_dirname}/*
%changelog
* Fri Aug 02 2024 Parag Nemade <pnemade AT redhat DOT com> - 1.5-5
- Resolves:RHEL-52493 - Add conditional for RHEL for using hunspell directory
- Add tmt CI tests
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.5-4
- Bump release for June 2024 mass rebuild

5
plans/hunspell-oc.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-oc
test: python3 test_dic_availability.py
framework: shell

View File

@ -0,0 +1,10 @@
#!/usr/bin/python3
import enchant
lang = "oc_FR"
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")