tests: fix and re-enable shell tests

This commit is contained in:
Yury Popov
2022-12-02 21:34:33 +03:00
parent c6dc7bfc3d
commit a6453f3751
5 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -43,14 +43,14 @@ compiled_test(readclause)
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(dictionary)
shell_test(language-numbers-cardinal)
shell_test(language-numbers-ordinal)
# shell_test(language-phonemes)
shell_test(language-phonemes)
shell_test(language-pronunciation)
shell_test(language-replace)
shell_test(ssml)
+2 -2
View File
@@ -8,7 +8,8 @@ echo -n "testing for Byte Order Marks in source files ... "
# TODO checking for other encodings (e.g. UTF-16, UTF-32, UTF-7) needs more elaborate search,
# 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
echo "found:"
@@ -19,4 +20,3 @@ else
echo "none found"
true
fi
+1 -1
View File
@@ -8,7 +8,7 @@ is_hash
# read column 5 (File) of espeak-ng --voices, skip the directory
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);
do if ! grep -q "test_phwav $lang" tests/language-phonemes.test
do if ! grep -q "test_phwav $lang" $0
then
echo "$lang missing a phoneme test in tests/language-phonemes.test";
exit 1;
@@ -2,8 +2,10 @@
echo -n "testing files for executable bits that shouldn't be executable ... "
cd $(dirname $0)/..
find * -executable -type f | \
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 ".*\.sh|tools/emoji" | # Ignore helper scripts \
grep -vE "src/ucd-tools/tools/(.*\.py|mkencodingtable)" | # Ignore ucd-tools helper scripts \
@@ -21,4 +23,3 @@ else
echo "none found"
true
fi
+2 -2
View File
@@ -36,8 +36,8 @@ test_ssml() {
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>"
# #410 is a bug in SSML. Sentence termination causes prosody stack to misfunction.