#!/bin/bash -x

regress () {
  if [ -f "`which banner`" ] ; then
      banner $1
  elif [ -f ./banner ] ; then
      ./banner $1
  fi  
  cp regression-run/$1.imp regression-run-tmp/$1.imp
# ./i2c -g regression-run-tmp/$1.imp 2> regression-run-tmp/$1.err
#  i77 --static -g regression-run-tmp/$1.imp 2> regression-run-tmp/$1.err
  i77 regression-run-tmp/$1.imp 2> regression-run-tmp/$1.err
  diff regression-run-tmp/$1.err regression-run/$1.err
  diff regression-run-tmp/$1.c regression-run/$1.c
  ./regression-run-tmp/$1 < regression-run-tmp/$1.in > regression-run-tmp/$1.out
  diff regression-run-tmp/$1.out regression-run/$1.out
}

regress ack
regress clover
regress systest   # will always be different results!
regress ICOMP     # C needs -Wno-tautological-compare
regress dscond
regress semicomment
regress outtest
regress mone
regress fracpt
regress test0004-intarith
regress jdmlibtest
regress concattest
