summaryrefslogtreecommitdiffstats
path: root/test/dotest
diff options
context:
space:
mode:
Diffstat (limited to 'test/dotest')
-rw-r--r--test/dotest40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/dotest b/test/dotest
new file mode 100644
index 0000000..2989109
--- /dev/null
+++ b/test/dotest
@@ -0,0 +1,40 @@
+#!/bin/sh
+thistest=$1
+format=$2
+output=$3
+tuning=$4
+if [ -f /usr/ucb/touch ] ; then
+ TOUCH=/usr/ucb/touch
+else
+ if [ -f /usr/bin/touch ] ; then
+ TOUCH=/usr/bin/touch
+ else
+ if [ -f /bin/touch ] ; then
+ TOUCH=/bin/touch
+ fi
+ fi
+fi
+if [ "$tuning" != "" ] ; then
+ case $tuning in
+ -*)
+ ;;
+ *)
+ tuning="-T $tuning"
+ ;;
+ esac
+fi
+echo "${thistest}...";
+/bin/cp /dev/null results/${thistest}
+( while read rule; do
+ echo "$rule" | ../ipftest -F $format -Rbr - -i input/${thistest} $tuning>> results/${thistest};
+ if [ $? -ne 0 ] ; then
+ exit 1;
+ fi
+ echo "--------" >> results/${thistest}
+done ) < regress/${thistest}
+cmp expected/${thistest} results/${thistest}
+status=$?
+if [ $status = 0 ] ; then
+ $TOUCH ${thistest}
+fi
+exit $status
OpenPOWER on IntegriCloud