3 # This program tests for a bug which caused a crash when
4 # very large files are presented.
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
9 TESTFILE=$TEMPDIR/`basename $0`.sps
13 # ensure that top_srcdir is absolute
14 cd $top_srcdir; top_srcdir=`pwd`
16 export STAT_CONFIG_PATH=$top_srcdir/config
52 activity="delete data"
53 rm -f $TEMPDIR/large.dat
54 if [ $? -ne 0 ] ; then no_result ; fi
56 printf "Creating input data. Please wait"
57 activity="create data"
60 done ) | head -100000 >> $TEMPDIR/large.dat
61 if [ $? -ne 0 ] ; then no_result ; fi
65 done ) | head -100000 >> $TEMPDIR/large.dat
66 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="create program"
71 DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
74 AGGREGATE OUTFILE=* /BREAK=X /A=N.
79 if [ $? -ne 0 ] ; then no_result ; fi
81 activity="run program"
82 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
83 if [ $? -ne 0 ] ; then fail ; fi
85 activity="appending to data"
86 # Put another 100,000 cases into large.dat
90 done ) | head -50000 >> $TEMPDIR/large.dat
91 if [ $? -ne 0 ] ; then no_result ; fi
93 activity="run program"
94 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
95 if [ $? -ne 0 ] ; then fail ; fi