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 -15
View File
@@ -1,19 +1,6 @@
#!/bin/sh
test_replace() {
TEST_LANG=$1
TEST_TEXT=$2
TEST_BROKEN=${3:-false}
echo "testing ${TEST_LANG}"
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
src/espeak-ng -Xq -v ${TEST_LANG} "${TEST_TEXT}" | grep -E "(Translate|Found:) " | sed -e 's/ \[.*][ ]*$//g' > actual.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"
##### bs: Bosnian