1#!/bin/sh 2 3PROG=${TEST_BINARY_DIR}/test_basic 4 5for _tin in ${TEST_DIR}/basic/*.in ; do 6 _t=`echo $_tin | sed -e 's/.in$//'` 7 _out=${TEST_OUT_DIR}/basic.out 8 $PROG $_t.in $_out 9 if [ $? -ne 0 ] ; then 10 echo "Test: $_t failed, output:" 11 cat $_out 12 rm $_out 13 exit 1 14 fi 15 if [ -f $_t.res ] ; then 16 diff -s $_out $_t.res -u 2>/dev/null 17 if [ $? -ne 0 ] ; then 18 rm $_out 19 echo "Test: $_t output missmatch" 20 exit 1 21 fi 22 fi 23 rm $_out 24done 25 26 27