mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
23 lines
489 B
Bash
Executable File
23 lines
489 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_replace() {
|
|
TEST_LANG=$1
|
|
TEST_TEXT=$2
|
|
|
|
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 -P "(Translate|Found:) " | sed -e 's/ \[.*][ ]*$//g' > actual.txt
|
|
diff expected.txt actual.txt || exit 1
|
|
}
|
|
|
|
##### English
|
|
|
|
cat > expected.txt <<EOF
|
|
Translate 'aeon'
|
|
Found: 'mediaeval'
|
|
Translate 'oeconomy'
|
|
Found: 'phoenix'
|
|
EOF
|
|
test_replace en "Æon mediæval. Œconomy phœnix."
|
|
|