3 # This program tests casefiles by running DEBUG CASEFILE.
5 TEMPDIR=/tmp/pspp-tst-$$
7 # ensure that top_builddir are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
12 # ensure that top_srcdir is absolute
13 top_srcdir=`cd $top_srcdir; pwd`
15 STAT_CONFIG_PATH=$top_srcdir/config
16 export STAT_CONFIG_PATH
53 activity="create program"
54 cat > $TEMPDIR/casefile.stat <<EOF
57 if [ $? -ne 0 ] ; then no_result ; fi
59 activity="run program"
60 $SUPERVISOR $top_builddir/src/pspp --testing-mode $TEMPDIR/casefile.stat > $TEMPDIR/casefile.out
61 if [ $? -ne 0 ] ; then no_result ; fi
63 activity="compare results"
64 perl -pi -e 's/^\s*$//g' $TEMPDIR/casefile.out
65 diff -b $TEMPDIR/casefile.out - <<EOF
66 Casefile tests succeeded.
69 if [ $? -ne 0 ] ; then no_result ; fi
72 if [ $? -ne 0 ] ; then fail ; fi