Move common functions into common script

This commit is contained in:
Valdis Vitolins
2021-04-05 23:24:06 +03:00
parent 2954e498ca
commit ec552d2566
14 changed files with 236 additions and 342 deletions
+2 -22
View File
@@ -1,26 +1,6 @@
#!/bin/sh
test_dict() {
TEST_LANG=$1
MESSAGE=$2
EXPECTED=$3
TEST_TEXT=$4
TEST_BROKEN=${5:-false}
if [ "x$MESSAGE" = x- ] ; then
echo "testing ${TEST_LANG}"
else
echo "testing ${TEST_LANG} ($MESSAGE)"
fi
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
src/espeak-ng ${OPTIONS} -xq -v ${TEST_LANG} "${TEST_TEXT}" > actual.txt
echo "${EXPECTED}" > expected.txt
if [ x$TEST_BROKEN = xbroken ] ; then
diff expected.txt actual.txt || (echo "... ignoring error (broken)" && true)
else
diff expected.txt actual.txt || exit 1
fi
}
# include common script
. "`dirname $0`/common"
##### Dictionary flags
# missing tests: only, only, stem, alt1..alt7, dot, hasdot, text, verbsf, accent_before, sentence, native