3 # This program tests the ERASE command.
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
50 activity="create file"
51 cat > $TEMPDIR/foobar <<EOF
54 if [ $? -ne 0 ] ; then no_result ; fi
56 activity="check for file 1"
57 if [ ! -f $TEMPDIR/foobar ] ; then no_result ; fi
60 activity="create program 1"
67 if [ $? -ne 0 ] ; then no_result ; fi
69 # foobar must still exist
70 activity="check for file 2"
71 if [ ! -f $TEMPDIR/foobar ] ; then fail ; fi
73 # This command must fail
75 $SUPERVISOR $here/../src/pspp $TESTFILE > /dev/null
76 if [ $? -eq 0 ] ; then fail ; fi
79 activity="create program 2"
85 if [ $? -ne 0 ] ; then no_result ; fi
89 $SUPERVISOR $here/../src/pspp $TESTFILE
90 if [ $? -ne 0 ] ; then fail ; fi
92 # foobar should now be gone
93 if [ -f $TEMPDIR/foobar ] ; then fail ; fi