#! /bin/bash tempfile=$$.tmp errfile=$$.2.tmp function tryit(){ good_stat=$1 cliffer > $tempfile 2> $errfile status=$? if ! test "_$status" = "_$good_stat" ; then cat $errfile exit $status fi } didsome=0; function checkit(){ test="$1" cat > ref$tempfile if ! diff -q ref$tempfile $tempfile > /dev/null; then echo "" echo "Ooops test $test failed." echo "Hint:" echo " :; diff ref$tempfile $tempfile" exit 3; fi printf "OK %2d... " $test rm $tempfile ref$tempfile $errfile if ((++didsome >= 5)) ; then echo ""; didsome=0 fi } ############# # Compound rotation: two 90 degree rotations # makes a 120 degree rotation about the 1,1,1 diagonal: < 0)) ; then echo ""; fi echo All OK! exit