3 # This program tests the ERASE command.
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
48 activity="create file"
49 cat > $TEMPDIR/foobar <<EOF
52 if [ $? -ne 0 ] ; then no_result ; fi
54 activity="check for file 1"
55 if [ ! -f $TEMPDIR/foobar ] ; then no_result ; fi
58 activity="create program 1"
59 cat > $TEMPDIR/foo.sps <<EOF
65 if [ $? -ne 0 ] ; then no_result ; fi
67 # foobar must still exist
68 activity="check for file 2"
69 if [ ! -f $TEMPDIR/foobar ] ; then fail ; fi
71 # This command must fail
73 $SUPERVISOR $here/../src/pspp $TEMPDIR/foo.sps > /dev/null
74 if [ $? -eq 0 ] ; then fail ; fi
77 activity="create program 2"
78 cat > $TEMPDIR/foo.sps <<EOF
83 if [ $? -ne 0 ] ; then no_result ; fi
87 $SUPERVISOR $here/../src/pspp $TEMPDIR/foo.sps
88 if [ $? -ne 0 ] ; then fail ; fi
90 # foobar should now be gone
91 if [ -f $TEMPDIR/foobar ] ; then fail ; fi
98 if [ $? -ne 0 ] ; then fail ; fi