test.sh (1185B)
1 #!/bin/bash 2 3 # about the hiatus error found in malherbe, see: 4 # http://books.google.de/books?id=qpQGAAAAQAAJ&pg=PA40&lpg=PA40&dq=Et+que+pour+retarder+une+heure+seulement+%22Pour+ne+mourir+jamais%22,+meure+%C3%A9ternellement&source=bl&ots=G8VEFnXkmB&sig=qzmHRiloQpIp6Ebb-9aJrYOoIM0&hl=en&sa=X&ei=3oL8T9WiJ6aB4gTK8pWPBw&redir_esc=y#v=onepage&q=Et%20que%20pour%20retarder%20une%20heure%20seulement%20%22Pour%20ne%20mourir%20jamais%22%2C%20meure%20%C3%A9ternellement&f=false 5 6 echo "It is normal that some errors occur when running this script" >/dev/stderr 7 echo "See test_expected_output.out for the usual errors that are output" >/dev/stderr 8 9 rm -f test_temp.txt; 10 rm -f test_temp_sorted.txt; 11 rm -f test_expected_sorted.txt; 12 13 for a in plint/test_data/*.tpl; do 14 echo "$a" 15 echo "$a" >> test_temp.txt 16 if [[ $a == *cyrano_full* ]] 17 then 18 python3 -m plint $(pwd)/$a --diaeresis=data/diaeresis_cyrano.json < $(pwd)/${a%.tpl} &>> test_temp.txt 19 else 20 ./test_one.sh $(basename "${a%.tpl}") &>> test_temp.txt 21 fi 22 done 23 24 if diff test_temp.txt test_expected_output.out 25 then 26 echo "TEST SUCCEED"; 27 RET=0 28 else 29 echo "TEST FAILED"; 30 RET=1 31 fi 32 33 rm -f test_temp.txt; 34 35 exit "$RET"