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-$$
12 # ensure that top_srcdir is absolute
13 cd $top_srcdir; top_srcdir=`pwd`
15 export STAT_CONFIG_PATH=$top_srcdir/config
52 activity="delete file"
53 rm -f $TEMPDIR/bar.dat
54 if [ $? -ne 0 ] ; then no_result ; fi
56 activity="create program"
57 cat > $TEMPDIR/foo.sps <<EOF
58 DATA LIST FILE='$TEMPDIR/bar.dat' /S 1-2 (A) X 3 .
62 if [ $? -ne 0 ] ; then no_result ; fi
64 activity="run program"
65 # This must exit with non zero status
66 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/foo.sps > /dev/null 2> $TEMPDIR/stderr
67 if [ $? -eq 0 ] ; then fail ; fi
69 activity="compare stderr"
70 diff $TEMPDIR/stderr - << EOF
71 pspp: Terminating NOW due to a fatal error!
73 if [ $? -ne 0 ] ; then fail ; fi