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 export STAT_CONFIG_PATH=$top_srcdir/config
49 activity="create file"
50 cat > $TEMPDIR/foobar <<EOF
53 if [ $? -ne 0 ] ; then no_result ; fi
55 activity="check for file 1"
56 if [ ! -f $TEMPDIR/foobar ] ; then no_result ; fi
59 activity="create program 1"
66 if [ $? -ne 0 ] ; then no_result ; fi
68 # foobar must still exist
69 activity="check for file 2"
70 if [ ! -f $TEMPDIR/foobar ] ; then fail ; fi
72 # This command must fail
74 $SUPERVISOR $here/../src/pspp $TESTFILE > /dev/null
75 if [ $? -eq 0 ] ; then fail ; fi
78 activity="create program 2"
84 if [ $? -ne 0 ] ; then no_result ; fi
88 $SUPERVISOR $here/../src/pspp $TESTFILE
89 if [ $? -ne 0 ] ; then fail ; fi
91 # foobar should now be gone
92 if [ -f $TEMPDIR/foobar ] ; then fail ; fi