3 # This program tests the BEGIN DATA / END DATA commands
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 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
51 activity="create program"
52 cat > $TESTFILE << EOF_foobar
53 title 'Test BEGIN DATA ... END DATA'.
75 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="run program"
79 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
80 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="compare data"
83 diff -b -B $TEMPDIR/pspp.list - << foobar
84 1.1 DATA LIST. Reading 1 record from the command file.
85 +--------+------+-------+------+
86 |Variable|Record|Columns|Format|
87 #========#======#=======#======#
90 +--------+------+-------+------+
100 2.1 DATA LIST. Reading 1 record from the command file.
101 +--------+------+-------+------+
102 |Variable|Record|Columns|Format|
103 #========#======#=======#======#
106 +--------+------+-------+------+
116 if [ $? -ne 0 ] ; then fail ; fi