t (380B)
1 #!/usr/bin/env bash 2 3 total=0 4 pass=0 5 6 export LD_LIBRARY_PATH="$PWD/../tib:$LD_LIBRARY_PATH" 7 8 for file in */*.tsp; do 9 expect=${file%.tsp}.expect 10 11 echo -n "testing $file ... " 12 if [[ $(../tisp "$file" 2>&1 | diff -q "$expect" - 2>&1 ) ]]; then 13 echo fail 14 else 15 echo ok 16 ((pass++)) 17 fi 18 ((total++)) 19 done 20 21 echo "$pass/$total tests passed" 22 23 [[ $pass == $total ]] && exit 0 24 exit 1