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
51 activity="create file"
52 cat > $TEMPDIR/foobar <<EOF
55 if [ $? -ne 0 ] ; then no_result ; fi
57 activity="check for file 1"
58 if [ ! -f $TEMPDIR/foobar ] ; then no_result ; fi
61 activity="create program 1"
68 if [ $? -ne 0 ] ; then no_result ; fi
70 # foobar must still exist
71 activity="check for file 2"
72 if [ ! -f $TEMPDIR/foobar ] ; then fail ; fi
74 # This command must fail
76 $SUPERVISOR $here/../src/pspp $TESTFILE > /dev/null
77 if [ $? -eq 0 ] ; then fail ; fi
80 activity="create program 2"
86 if [ $? -ne 0 ] ; then no_result ; fi
90 $SUPERVISOR $here/../src/pspp $TESTFILE
91 if [ $? -ne 0 ] ; then fail ; fi
93 # foobar should now be gone
94 if [ -f $TEMPDIR/foobar ] ; then fail ; fi