Browse Source

tests: fix and re-enable shell tests

master
Yury Popov 2 years ago
parent
commit
a6453f3751
No account linked to committer's email address

+ 3
- 3
tests/CMakeLists.txt View File



if (SHELL AND UNIX) if (SHELL AND UNIX)


# shell_test(bom)
# shell_test(non-executable-files-with-executable-bit)
shell_test(bom)
shell_test(non-executable-files-with-executable-bit)


shell_test(cmd_options) shell_test(cmd_options)
shell_test(dictionary) shell_test(dictionary)
shell_test(language-numbers-cardinal) shell_test(language-numbers-cardinal)
shell_test(language-numbers-ordinal) shell_test(language-numbers-ordinal)
# shell_test(language-phonemes)
shell_test(language-phonemes)
shell_test(language-pronunciation) shell_test(language-pronunciation)
shell_test(language-replace) shell_test(language-replace)
shell_test(ssml) shell_test(ssml)

+ 2
- 2
tests/bom.test View File

# TODO checking for other encodings (e.g. UTF-16, UTF-32, UTF-7) needs more elaborate search, # TODO checking for other encodings (e.g. UTF-16, UTF-32, UTF-7) needs more elaborate search,
# otherwise it shows many false positives # otherwise it shows many false positives


grep -ErlI $'\xEF\xBB\xBF' * | tee tests/bom.check >/dev/null # UTF-8
cd $(dirname $0)/..
grep -ErlI $'\xEF\xBB\xBF' * | grep -v '^build/' | tee tests/bom.check >/dev/null # UTF-8


if [ -s tests/bom.check ] ; then if [ -s tests/bom.check ] ; then
echo "found:" echo "found:"
echo "none found" echo "none found"
true true
fi fi


+ 1
- 1
tests/language-phonemes.test View File

# read column 5 (File) of espeak-ng --voices, skip the directory # read column 5 (File) of espeak-ng --voices, skip the directory
echo "checking if all supported languages have phoneme tests ..." echo "checking if all supported languages have phoneme tests ..."
for lang in $(ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} src/espeak-ng --voices | awk '{print $5}' | cut -d "/" -f 2-2 | tail -n+2); for lang in $(ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} src/espeak-ng --voices | awk '{print $5}' | cut -d "/" -f 2-2 | tail -n+2);
do if ! grep -q "test_phwav $lang" tests/language-phonemes.test
do if ! grep -q "test_phwav $lang" $0
then then
echo "$lang missing a phoneme test in tests/language-phonemes.test"; echo "$lang missing a phoneme test in tests/language-phonemes.test";
exit 1; exit 1;

+ 2
- 1
tests/non-executable-files-with-executable-bit.test View File



echo -n "testing files for executable bits that shouldn't be executable ... " echo -n "testing files for executable bits that shouldn't be executable ... "


cd $(dirname $0)/..
find * -executable -type f | \ find * -executable -type f | \
grep -vE "compile|config\.(guess|status|sub)|configure|depcomp|install-sh|libtool|missing" | # Ignore autotools output \ grep -vE "compile|config\.(guess|status|sub)|configure|depcomp|install-sh|libtool|missing" | # Ignore autotools output \
grep -vE "build" | # Ignore cmake output \
grep -vE ".*\.test|tests/common|src(/\.libs)?/(e?speak-ng|.*\.so\..*)|src/\.libs/lt-espeak-ng|android" | # Ignore built programs and libraries \ grep -vE ".*\.test|tests/common|src(/\.libs)?/(e?speak-ng|.*\.so\..*)|src/\.libs/lt-espeak-ng|android" | # Ignore built programs and libraries \
grep -vE ".*\.sh|tools/emoji" | # Ignore helper scripts \ grep -vE ".*\.sh|tools/emoji" | # Ignore helper scripts \
grep -vE "src/ucd-tools/tools/(.*\.py|mkencodingtable)" | # Ignore ucd-tools helper scripts \ grep -vE "src/ucd-tools/tools/(.*\.py|mkencodingtable)" | # Ignore ucd-tools helper scripts \
echo "none found" echo "none found"
true true
fi fi


+ 2
- 2
tests/ssml.test View File

diff expected.txt actual.txt || exit 1 diff expected.txt actual.txt || exit 1
} }


for i in `ls tests/ssml/*.ssml` ; do test_ssml $i; done
for i in `ls tests/ssml/*.ssml2` ; do test_ssml $i punct; done
for i in `dirname $0`/ssml/*.ssml ; do test_ssml $i; done
for i in `dirname $0`/ssml/*.ssml2 ; do test_ssml $i punct; done


test_ssml_audio "<prosody>" 88fccb35536158f25f4ae44a03fb005fef95c99b "<speak><prosody rate=\"x-slow\" pitch=\"low\"> Slow and low </prosody><prosody rate=\"x-fast\" pitch=\"x-high\"> Fast and high.</prosody></speak>" test_ssml_audio "<prosody>" 88fccb35536158f25f4ae44a03fb005fef95c99b "<speak><prosody rate=\"x-slow\" pitch=\"low\"> Slow and low </prosody><prosody rate=\"x-fast\" pitch=\"x-high\"> Fast and high.</prosody></speak>"
# #410 is a bug in SSML. Sentence termination causes prosody stack to misfunction. # #410 is a bug in SSML. Sentence termination causes prosody stack to misfunction.

Loading…
Cancel
Save