re-import sources as agreed with the maintainer
This commit is contained in:
parent
c18281150c
commit
4c5b387aa9
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
SOURCES/libvoikko-4.1.1.tar.gz
|
||||
/libvoikko-3.8.tar.gz
|
||||
/libvoikko-4.1.1.tar.gz
|
||||
|
||||
26
tests/scripts/run.sh
Normal file
26
tests/scripts/run.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
check_pkg() {
|
||||
local pkg=$1
|
||||
if rpm -q $pkg
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
check_pkg "python3-libvoikko"
|
||||
check_pkg "libvoikko"
|
||||
check_pkg "malaga-suomi-voikko"
|
||||
|
||||
python3 test_libvoikko.py
|
||||
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
|
||||
22
tests/scripts/test_libvoikko.py
Normal file
22
tests/scripts/test_libvoikko.py
Normal file
@ -0,0 +1,22 @@
|
||||
import sys
|
||||
import libvoikko
|
||||
|
||||
FAILED_COUNT = 0
|
||||
|
||||
def spellcheck(word):
|
||||
v = libvoikko.Voikko('fi')
|
||||
return v.spell(word)
|
||||
|
||||
if not spellcheck('kisssa'):
|
||||
print("PASS")
|
||||
else:
|
||||
FAILED_COUNT += 1
|
||||
print("FAIL")
|
||||
|
||||
if spellcheck('hei'):
|
||||
print("PASS")
|
||||
else:
|
||||
FAILED_COUNT += 1
|
||||
print("FAIL")
|
||||
|
||||
sys.exit(FAILED_COUNT)
|
||||
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
@ -0,0 +1,12 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- python3-libvoikko
|
||||
- malaga-suomi-voikko
|
||||
tests:
|
||||
- simple:
|
||||
dir: scripts
|
||||
run: bash run.sh
|
||||
Loading…
Reference in New Issue
Block a user