#! /bin/bash TARGETS="sample-inputs/*.txt testing-inputs/*.txt" TEMP=correctness.tmp echo Running regression tests for i in $TARGETS do ./proj2 < $i.out 1 $i 2 3 EOF grep -v "Elapsed time" $i.official > $TEMP if ! diff $i.out $TEMP then echo FAILED: Regression on $i came up with wrong result! exit -1 fi done rm $TEMP