From 6ae5f0df936d3ab2f414fa6d50f2679ea8662ab5 Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Thu, 3 Jun 2021 19:55:54 +0530 Subject: [PATCH] Resolves:rhbz#1967646 - Correct the License: tag to LGPLv3+ based on LICENSE.txt file Added gating tests --- hunspell-eu.spec | 8 ++++++-- tests/scripts/run_tests.sh | 4 ++++ tests/scripts/test_dic_availability.py | 10 ++++++++++ tests/scripts/test_suggest_words.py | 11 +++++++++++ tests/tests.yml | 14 ++++++++++++++ 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 tests/scripts/run_tests.sh create mode 100644 tests/scripts/test_dic_availability.py create mode 100644 tests/scripts/test_suggest_words.py create mode 100644 tests/tests.yml diff --git a/hunspell-eu.spec b/hunspell-eu.spec index 429db9d..57e41b3 100644 --- a/hunspell-eu.spec +++ b/hunspell-eu.spec @@ -1,10 +1,10 @@ Name: hunspell-eu Summary: Basque hunspell dictionaries Version: 5.1 -Release: 2%{?dist} +Release: 3%{?dist} Source0: http://xuxen.eus/static/hunspell/xuxen_%{version}_hunspell.zip URL: http://xuxen.eus -License: GPLv3 +License: LGPLv3+ BuildArch: noarch Requires: hunspell @@ -29,6 +29,10 @@ cp -p eu_ES.aff %{buildroot}%{_datadir}/myspell/eu_ES.aff %{_datadir}/myspell/* %changelog +* Thu Jun 03 2021 Parag Nemade - 5.1-3 +- Resolves:rhbz#1967646 - Correct the License: tag to LGPLv3+ based on LICENSE.txt file +- Added gating tests + * Fri Apr 16 2021 Mohan Boddu - 5.1-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100644 index 0000000..80d965a --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +python3 test_suggest_words.py +python3 test_dic_availability.py diff --git a/tests/scripts/test_dic_availability.py b/tests/scripts/test_dic_availability.py new file mode 100644 index 0000000..ce7add8 --- /dev/null +++ b/tests/scripts/test_dic_availability.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import enchant + +lang = "eu_ES" +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/scripts/test_suggest_words.py b/tests/scripts/test_suggest_words.py new file mode 100644 index 0000000..49547af --- /dev/null +++ b/tests/scripts/test_suggest_words.py @@ -0,0 +1,11 @@ +#!/usr/bin/python3 + +import enchant + +wdlst = [ "Namak", "bidea", "Chait"] +dic = enchant.Dict("eu_ES") +for wd in wdlst: + dic.check(wd) + print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd))) + + diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..c621462 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,14 @@ +- hosts: localhost + roles: + - role: standard-test-basic + required_packages: + - python3-enchant + tags: + - classic + tests: + - sample: + dir: scripts/ + run: ./run_tests.sh + + +