3 # This program tests the LAG function
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 > $TEMPDIR/lag.stat <<EOF
67 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="run program"
70 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/lag.stat
71 if [ $? -ne 0 ] ; then no_result ; fi
73 activity="compare result"
74 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
75 diff -b $TEMPDIR/pspp.list - <<EOF
76 1.1 DATA LIST. Reading 1 record from INLINE.
77 +--------+------+-------+------+
78 |Variable|Record|Columns|Format|
79 #========#======#=======#======#
81 +--------+------+-------+------+
83 - -------- -------- --------
90 if [ $? -ne 0 ] ; then fail ; fi