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`
14 PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
16 # ensure that top_srcdir is absolute
17 top_srcdir=`cd $top_srcdir; pwd`
19 STAT_CONFIG_PATH=$top_srcdir/config
20 export STAT_CONFIG_PATH
25 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
26 echo "NOT cleaning $TEMPDIR"
61 activity="create program"
63 DATA LIST LIST NOTABLE /LOCATION * EDITOR * SHELL * FREQ * .
75 SAVE /OUTFILE='$TEMPDIR/foo.sav'.
77 GET /FILE='$TEMPDIR/foo.sav'.
82 * But this one get rubbish
86 if [ $? -ne 0 ] ; then no_result ; fi
89 activity="run program"
90 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
91 if [ $? -ne 0 ] ; then no_result ; fi
96 activity="compare output"
97 diff -c $TEMPDIR/pspp.csv - << EOF
99 LOCATION,EDITOR,SHELL,FREQ
110 LOCATION,EDITOR,SHELL,FREQ
120 if [ $? -ne 0 ] ; then fail ; fi