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 -23
View File
@@ -1,27 +1,6 @@
#!/bin/sh
test_commandlineoptions() {
TEST_LANG=$1
MESSAGE=$2
OPTIONS=$3
EXPECTED=$4
TEST_TEXT=$5
TEST_BROKEN=${6:-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"
##### Script coverage