+Sat May 14 08:22:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * dfm-read.c: Fixed polarity of test in dfm-close-reader. Closes
+ Bug #13082
+
Tue May 10 20:08:18 2005 Ben Pfaff <blp@gnu.org>
* data-in.c: (data_in) Add assertion to check input specifier.
assert (inline_open_cnt > 0);
still_open = --inline_open_cnt;
- if (!still_open)
+ if (still_open)
{
/* Skip any remaining data on the inline file. */
while ((r->flags & DFM_EOF) == 0)
--- /dev/null
+#!/bin/sh
+
+# This program tests for a bug which caused a crash when
+# reading invalid INPUT PROGRAM syntax.
+
+TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
+
+here=`pwd`;
+
+# ensure that top_srcdir is absolute
+cd $top_srcdir; top_srcdir=`pwd`
+
+export STAT_CONFIG_PATH=$top_srcdir/config
+
+
+cleanup()
+{
+ if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
+ echo "NOT cleaning $TEMPDIR"
+ return ;
+ fi
+ rm -rf $TEMPDIR
+}
+
+
+fail()
+{
+ echo $activity
+ echo FAILED
+ cleanup;
+ exit 1;
+}
+
+
+no_result()
+{
+ echo $activity
+ echo NO RESULT;
+ cleanup;
+ exit 2;
+}
+
+pass()
+{
+ cleanup;
+ exit 0;
+}
+
+mkdir -p $TEMPDIR
+
+cd $TEMPDIR
+
+
+activity="create test program"
+cat > $TESTFILE <<EOF
+INPUT PROGRAM.
+DATA LIST /a 1-9.
+BEGIN DATA
+123456789
+END DATA.
+END INPUT PROGRAM.
+
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
+# The above syntax is invalid, so this program should fail to parse
+activity="run program"
+$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE > /dev/null
+if [ $? -ne 1 ] ; then fail ; fi
+
+
+
+pass;