Add test for bug #11916.
[pspp] / tests / command / beg-data.sh
index 382e2a036594c327b3700e3892805927872c3395..4820ab660fea114384da1ede0e2bc812ab678703 100755 (executable)
@@ -3,6 +3,7 @@
 # This program tests the BEGIN DATA / END DATA commands
 
 TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
 
 here=`pwd`;
 
@@ -46,15 +47,9 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="create program"
-cat > $TEMPDIR/prog.sps << EOF_foobar
+cat > $TESTFILE << EOF_foobar
 title 'Test BEGIN DATA ... END DATA'.
 
-remark EOF
-----------------------------------------------------------------------
-First we show that we can input data with BEGIN DATA/END DATA after
-a procedure.
-----------------------------------------------------------------------
-EOF
 data list /A B 1-2.
 list.
 begin data.
@@ -65,11 +60,6 @@ begin data.
 90
 end data.
 
-remark EOF
-----------------------------------------------------------------------
-Next we show that BEGIN DATA/END DATA work fine on their own as well.
-----------------------------------------------------------------------
-EOF
 data list /A B 1-2.
 begin data.
 09
@@ -84,16 +74,11 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/prog.sps
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare data"
 diff -b -B $TEMPDIR/pspp.list - << foobar
-----------------------------------------------------------------------
-First we show that we can input data with BEGIN DATA/END DATA after
-a procedure.
-----------------------------------------------------------------------
-
 1.1 DATA LIST.  Reading 1 record from the command file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|
@@ -110,10 +95,6 @@ A B
 7 8 
 9 0 
 
-----------------------------------------------------------------------
-Next we show that BEGIN DATA/END DATA work fine on their own as well.
-----------------------------------------------------------------------
-
 2.1 DATA LIST.  Reading 1 record from the command file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|