#!/bin/csh -f

echo ===============================
echo "testing with -sanity-check flag"
../bx_8086 -sanity-check
echo ===============================

foreach i ( *.test )
  echo "testing with" $i
  set name = $i:r
  ../bx_8086 -script $i >&! $name.out
  if (-e $name.ref) then
    diff $name.ref $name.out
  else
    echo "no reference file $name.ref, creating..."
    cp $name.out $name.ref
  endif
end
