# This program tests the BEGIN DATA / END DATA commands
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
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
cleanup()
{
+ cd /
rm -rf $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.
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
activity="run program"
-$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 $TEMPDIR/pspp.list - << foobar
-----------------------------------------------------------------------
-First we show that we can input data with BEGIN DATA/END DATA after
-a procedure.
-----------------------------------------------------------------------
-
+diff -b -B $TEMPDIR/pspp.list - << foobar
1.1 DATA LIST. Reading 1 record from the command file.
+--------+------+-------+------+
|Variable|Record|Columns|Format|
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|