# This program tests the INSERT command
-TEMPDIR=/tmp/pspp-tst-$$
+BASETEMPDIR=/tmp/pspp-tst-$$
+TEMPDIR=$BASETEMPDIR/link
TESTFILE=$TEMPDIR/`basename $0`.sps
# ensure that top_srcdir and top_builddir are absolute
cleanup()
{
if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
- echo "NOT cleaning $TEMPDIR"
+ echo "NOT cleaning $BASETEMPDIR"
return ;
fi
- rm -rf $TEMPDIR
+ cd /
+ rm -rf $BASETEMPDIR
}
exit 0;
}
-mkdir -p $TEMPDIR
+mkdir -p $BASETEMPDIR/target
+
+ln -s $BASETEMPDIR/target $TEMPDIR
cd $TEMPDIR
EOF
if [ $? -ne 0 ] ; then fail ; fi
+# Test for regression against bug #24569 in which PSPP crashed
+# upon attempt to insert a nonexistent file.
+activity="create wrapper 9"
+cat <<EOF > $TESTFILE
+INSERT
+ FILE='$TEMPDIR/nonexistent'
+ ERROR=CONTINUE.
+ .
+
+LIST.
+
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+#This command should fail
+activity="run program 7"
+$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null
+if [ $? -eq 0 ] ; then no_result ; fi
pass;