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
50 activity="create program"
51 cat > $TESTFILE << EOF_foobar
52 title 'Test BEGIN DATA ... END DATA'.
74 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="run program"
78 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
79 if [ $? -ne 0 ] ; then no_result ; fi
81 activity="compare data"
82 diff -b -B $TEMPDIR/pspp.list - << foobar
83 1.1 DATA LIST. Reading 1 record from the command file.
84 +--------+------+-------+------+
85 |Variable|Record|Columns|Format|
86 #========#======#=======#======#
89 +--------+------+-------+------+
99 2.1 DATA LIST. Reading 1 record from the command file.
100 +--------+------+-------+------+
101 |Variable|Record|Columns|Format|
102 #========#======#=======#======#
105 +--------+------+-------+------+
115 if [ $? -ne 0 ] ; then fail ; fi