6 # This script tests that incorrect syntax on various commands produces the
7 # appropriate error messages
13 #for x in `cd $srcdir; echo *.stat *.data`; do
14 # if [ ! -e $x ]; then
20 if [ -z "$BENCHMARK" ]; then
21 for t in $top_srcdir/tests/*.stat; do
24 # if [ $x = bignum.stat ] ; then continue ; fi
25 # if [ $x = data-list.stat ] ; then continue ; fi
26 # if [ $x = do-repeat.stat ] ; then continue ; fi
27 # if [ $x = list.stat ] ; then continue ; fi
28 # if [ $x = print.stat ] ; then continue ; fi
29 # if [ $x = reread.stat ] ; then continue ; fi
30 # if [ $x = weighting.stat ] ; then continue ; fi
31 cat $t | ../src/pspp -B $top_srcdir/config --testing-mode - > $build_dir/$x.actual
32 if [ -f $top_srcdir/tests/expect/$x ]; then
33 if diff -u $top_srcdir/tests/expect/$x $build_dir/$x.actual; then
34 echo "pass"; rm $build_dir/$x.actual
36 echo "FAIL"; RESULT=fail ; exit 1
39 if [ -s $build_dir/$x.actual ]; then
40 diff -u /dev/null $build_dir/$x.actual || true
41 echo "FAIL"; RESULT=fail ; exit 1
43 echo "pass"; rm $build_dir/$x.actual
48 mkdir $build_dir/benchmark || true
49 rm -f $build_dir/benchmark/*
50 for x in $top_srcdir/tests/*.stat; do
52 ../src/pspp -B $top_srcdir/config --testing-mode $x > $build_dir/benchmark/$x
53 if [ ! -s $build_dirbenchmark/$x ]; then
54 rm $build_dir/benchmark/$x
60 # for x in *.stat *.data; do
66 if [ $RESULT = fail ]; then exit 1; fi