#!/bin/sh # -*- ksh -*- someerror=0 for testname in `cat tests` do cd $testname rm -f actual.out actual.err ../../../chpp $testname.txt >actual.out 2>actual.err error=0 diff expected.out actual.out >/dev/null if [ $? -ne 0 ] then error=1 fi diff expected.err actual.err >/dev/null if [ $? -ne 0 ] then error=1 fi if [ $error -eq 0 ] then echo test $testname passed rm -f actual.out actual.err else echo test $testname failed someerror=1 fi cd .. done if [ $someerror -eq 0 ] then echo --- all tests passed else echo --- some tests failed fi