3 # This tests checks that when a fatal error occurs,
4 # and appropriate notice is printed and the program exits with a
8 TEMPDIR=/tmp/pspp-tst-$$
9 TESTFILE=$TEMPDIR/`basename $0`.sps
13 # ensure that top_srcdir is absolute
14 cd $top_srcdir; top_srcdir=`pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
54 activity="delete file"
55 rm -f $TEMPDIR/bar.dat
56 if [ $? -ne 0 ] ; then no_result ; fi
58 activity="create program"
59 cat > $TEMPDIR/foo.sps <<EOF
60 DATA LIST FILE='$TEMPDIR/bar.dat' /S 1-2 (A) X 3 .
64 if [ $? -ne 0 ] ; then no_result ; fi
66 activity="run program"
67 # This must exit with non zero status
68 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/foo.sps > /dev/null 2> $TEMPDIR/stderr
69 if [ $? -eq 0 ] ; then fail ; fi
71 activity="compare stderr"
72 diff $TEMPDIR/stderr - << EOF
73 pspp: Terminating NOW due to a fatal error!
75 if [ $? -ne 0 ] ; then fail ; fi