From 43dee60c33e17656d4553cfe2bdeae44c0abf60b Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Tue, 6 Apr 2021 16:10:26 +0300 Subject: [PATCH] Make test_dict the same as test_phonemes --- tests/common | 19 +++++++------- tests/dictionary.test | 58 +++++++++++++++++++++---------------------- tests/voices.test | 4 +-- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/tests/common b/tests/common index e2a4fcc5..bd23796c 100755 --- a/tests/common +++ b/tests/common @@ -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 diff --git a/tests/dictionary.test b/tests/dictionary.test index f2f3402b..6624e3e4 100755 --- a/tests/dictionary.test +++ b/tests/dictionary.test @@ -5,33 +5,33 @@ ##### Dictionary flags # missing tests: only, only, stem, alt1..alt7, dot, hasdot, text, verbsf, accent_before, sentence, native -test_dict en "\$1 - \$7" "'adbl0k adv'3:s ,abs@nt'i: g,astroUInt'EstIn@L" "adblock adverse absentee gastrointestinal" -test_dict en "\$u and \$u+" "fO@ ju:_:_: and Di:; aI k@mp'e@ D'i:" "for you and thee I compare thee" -test_dict en "\$u1 and \$u1+" "aI w,oUnta#v_:_: b,Vt ju: S,Ud@v_:_: and DeI S'Udhav" "I won't have but you should have and they should have" -test_dict en "\$u2 and \$u2+" "@p,0n DIs aIvh,ad w0t aIvh'ad" "Upon this I've had what I've had" -test_dict ro "\$u3 and \$u3+" ",anum,ite d,umneat,a d'umneat,a" "anumite dumneata dumneata" -test_dict en "\$pause" "ju: n'oU It_:_: bIk'0z DIs ha#z_:_: s'Ins b,i:n" "you know it because this has since been" -test_dict en "\$brk" "_!wID,In_! wID,In_! wID,In wID'In" "within within within within" -test_dict de "\$strend" "maR'i:A: l'i:st t'o:mA:s de:n ts'aIt_|,Ungzart,i:k@l f'Or" "Maria liest Thomas den Zeitungsartikel vor" -test_dict de "\$strend2" "j'Etst _|,EtvA:" "jetzt etwa" -test_dict hu "\$unstressend" "m'EgfiJEle:Se:hEz" "megfigyeléséhez" -test_dict en "\$abbrev" ",Em,oUt,i:d'i:; 0vDI2; ,aI;,A@s'i:; ,Em,Em'oU,A@p,i:dZ'i:" "motd of the irc mmorpg" -test_dict fi "\$double" "t'ule t:'&nne_:_: ja s'yYr r'uoka:" "tule tänne ja syö ruokaa" -test_dict en "\$max3" "'ast@r,Iska#st@r,Iska#st@r,Isk" "*****" -test_dict sk "\$combine" "n'aobed b'esjedla" "na obed bez jedla" -test_dict en "\$verb and \$verbf \(not $verbsf\)" "O:lt'3:n@t s'u:n 'O:lt3n,eIt_:_: and '0lt3n,eIts s'u:n 'O:lt3n,eIts" "alternate soon alternate and alternates soon alternates" -test_dict en "\$noun and \$nounf" "It Iz n,0t@ d'aIdZEst t@ daIdZ'Est" "it is not a digest to digest" -test_dict en "\$verbextend" "a# d'aIdZEst t@ n,0t 'adI2d 'Ekstr@ w'3:dz h'i@3 daIdZ'Est" "a digest to not added extra words here digest" -test_dict en "\$pastf and \$past" "r'i:d t@bi r'Ed" "read to be read" -test_dict en "\$capital" "D@ p'oUlIS p'0lIS" "The Polish polish" -test_dict en "\$allcaps" ",aIt'i: h'az j,u:'Es v,i:;'Es It ha#z ,Vs" "IT HAS US vs it has us" -test_dict af "\$accent" "d'e@lte@k@n_|'o@ k'api_|'o@ _|ak'yt_|'o@" "ö ô ó" -test_dict it "\$atstart" "fig'uRatI v,U'Esse figUR'atI" "figurati vs figurati" -test_dict it "\$atend" "s,Ents2a v,U'Esse s'Entsa" "senza vs senza" -test_dict en ".replace" "m'eIlstr0m m'eIlstr0m" "mælstrom maelstrom" +test_dict en "'adbl0k adv'3:s ,abs@nt'i: g,astroUInt'EstIn@L" "adblock adverse absentee gastrointestinal" "\$1 - \$7" +test_dict en "fO@ ju:_:_: and Di:; aI k@mp'e@ D'i:" "for you and thee I compare thee" "\$u and \$u+" +test_dict en "aI w,oUnta#v_:_: b,Vt ju: S,Ud@v_:_: and DeI S'Udhav" "I won't have but you should have and they should have" "\$u1 and \$u1+" +test_dict en "@p,0n DIs aIvh,ad w0t aIvh'ad" "Upon this I've had what I've had" "\$u2 and \$u2+" +test_dict ro ",anum,ite d,umneat,a d'umneat,a" "anumite dumneata dumneata" "\$u3 and \$u3+" +test_dict en "ju: n'oU It_:_: bIk'0z DIs ha#z_:_: s'Ins b,i:n" "you know it because this has since been" "\$pause" +test_dict en "_!wID,In_! wID,In_! wID,In wID'In" "within within within within" "\$brk" +test_dict de "maR'i:A: l'i:st t'o:mA:s de:n ts'aIt_|,Ungzart,i:k@l f'Or" "Maria liest Thomas den Zeitungsartikel vor" "\$strend" +test_dict de "j'Etst _|,EtvA:" "jetzt etwa" "\$strend2" +test_dict hu "m'EgfiJEle:Se:hEz" "megfigyeléséhez" "\$unstressend" +test_dict en ",Em,oUt,i:d'i:; 0vDI2; ,aI;,A@s'i:; ,Em,Em'oU,A@p,i:dZ'i:" "motd of the irc mmorpg" +test_dict fi "t'ule t:'&nne_:_: ja s'yYr r'uoka:" "tule tänne ja syö ruokaa" "\$double" +test_dict en "'ast@r,Iska#st@r,Iska#st@r,Isk" "*****" "\$max3" +test_dict sk "n'aobed b'esjedla" "na obed bez jedla" "\$combine" +test_dict en "O:lt'3:n@t s'u:n 'O:lt3n,eIt_:_: and '0lt3n,eIts s'u:n 'O:lt3n,eIts" "alternate soon alternate and alternates soon alternates" "\$verb and \$verbf \(not $verbsf\)" +test_dict en "It Iz n,0t@ d'aIdZEst t@ daIdZ'Est" "it is not a digest to digest" "\$noun and \$nounf" +test_dict en "a# d'aIdZEst t@ n,0t 'adI2d 'Ekstr@ w'3:dz h'i@3 daIdZ'Est" "a digest to not added extra words here digest" "\$verbextend" +test_dict en "r'i:d t@bi r'Ed" "read to be read" "\$pastf and \$past" +test_dict en "D@ p'oUlIS p'0lIS" "The Polish polish" "\$capital" +test_dict en ",aIt'i: h'az j,u:'Es v,i:;'Es It ha#z ,Vs" "IT HAS US vs it has us" "\$allcaps" +test_dict af "d'e@lte@k@n_|'o@ k'api_|'o@ _|ak'yt_|'o@" "ö ô ó" "\$accent" +test_dict it "fig'uRatI v,U'Esse figUR'atI" "figurati vs figurati" "\$atstart" +test_dict it "s,Ents2a v,U'Esse s'Entsa" "senza vs senza" "\$atend" +test_dict en "m'eIlstr0m m'eIlstr0m" "mælstrom maelstrom" ".replace" # rest of the numbers are tested in other test files -test_dict en "_dpt" "z'i@roU pOInt n'aIn n'aIn" "0.99" -test_dict ru "_dpt2" "ojd;'in _:'i_: n'ojl n'ojl_d;Is;'AtYx" "1,00" -test_dict en "_0and" "t'u:h'VndrI2d@n tw'Enti" "220" -test_dict af "_^_" "(fr)avinj'O~(en) b'0st@n(af) S'ina" "avignon boston china" -test_dict en "(multiple words)" "s'VtS _a#z" "such as" +test_dict en "z'i@roU pOInt n'aIn n'aIn" "0.99" "_dpt" +test_dict ru "ojd;'in _:'i_: n'ojl n'ojl_d;Is;'AtYx" "1,00" "_dpt2" +test_dict en "t'u:h'VndrI2d@n tw'Enti" "220" "_0and" +test_dict af "(fr)avinj'O~(en) b'0st@n(af) S'ina" "avignon boston china" "_^_" +test_dict en "s'VtS _a#z" "such as" "(multiple words)" diff --git a/tests/voices.test b/tests/voices.test index b19437d9..8492608c 100755 --- a/tests/voices.test +++ b/tests/voices.test @@ -3,5 +3,5 @@ . "`dirname $0`/common" ##### Voice options -test_dict ka "lowercaseSentence" "s'asi,amovn,oa t#k#v'eni g'ats#noba -r'ogor brdz'andebit#" "სასიამოვნოა თქვენი გაცნობა. როგორ ბრძანდებით" #872 +test_dict ka "s'asi,amovn,oa t#k#v'eni g'ats#noba +r'ogor brdz'andebit#" "სასიამოვნოა თქვენი გაცნობა. როგორ ბრძანდებით" "lowercaseSentence" #872