Make test_dict the same as test_phonemes

This commit is contained in:
Valdis Vitolins
2021-04-06 16:10:26 +03:00
parent e14b567d77
commit 43dee60c33
3 changed files with 40 additions and 41 deletions
+9 -10
View File
@@ -103,20 +103,19 @@ test_lang() {
test_dict() {
TEST_LANG=$1
MESSAGE=$2
EXPECTED=$3
TEST_TEXT=$4
TEST_BROKEN=${5:-false}
EXPECTED=$2
TEST_TEXT=$3
MESSAGE=$4
if [ "x$MESSAGE" = x- ] ; then
echo "testing ${TEST_LANG}"
else
echo "testing ${TEST_LANG} ($MESSAGE)"
if [ "$MESSAGE" = "" ] ; then
MESSAGE=$TEST_TEXT
fi
echo "testing ${TEST_LANG} ... $MESSAGE"
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
src/espeak-ng ${OPTIONS} -xq -v ${TEST_LANG} "${TEST_TEXT}" > actual.txt
src/espeak-ng -xq -v ${TEST_LANG} "${TEST_TEXT}" > actual.txt
echo "${EXPECTED}" > expected.txt
if [ x$TEST_BROKEN = xbroken ] ; then
if [ "$MESSAGE" = "broken" ] ; then
diff expected.txt actual.txt || (echo "... ignoring error (broken)" && true)
else
diff expected.txt actual.txt || exit 1