3 # This program tests for a bug which caused
4 # the second procedure after GET FILE to corrupt its output
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_builddir are absolute
11 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
12 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
13 top_builddir=`cd $top_builddir; pwd`
15 # ensure that top_srcdir is absolute
16 top_srcdir=`cd $top_srcdir; pwd`
18 STAT_CONFIG_PATH=$top_srcdir/config
19 export STAT_CONFIG_PATH
56 activity="create program"
58 DATA LIST LIST NOTABLE /LOCATION * EDITOR * SHELL * FREQ * .
70 SAVE /OUTFILE='$TEMPDIR/foo.sav'.
72 GET /FILE='$TEMPDIR/foo.sav'.
77 * But this one get rubbish
81 if [ $? -ne 0 ] ; then no_result ; fi
84 activity="run program"
85 $SUPERVISOR $top_builddir/src/pspp -o raw-ascii $TESTFILE
86 if [ $? -ne 0 ] ; then no_result ; fi
91 activity="compare output"
92 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
93 diff -b -w $TEMPDIR/pspp.list - << EOF
94 LOCATION EDITOR SHELL FREQ
95 -------- -------- -------- --------
104 LOCATION EDITOR SHELL FREQ
105 -------- -------- -------- --------
115 if [ $? -ne 0 ] ; then fail ; fi