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 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
53 activity="delete data"
54 rm -f $TEMPDIR/large.dat
55 if [ $? -ne 0 ] ; then no_result ; fi
57 printf "Creating input data. Please wait"
58 activity="create data"
61 done ) | head -100000 >> $TEMPDIR/large.dat
62 if [ $? -ne 0 ] ; then no_result ; fi
66 done ) | head -100000 >> $TEMPDIR/large.dat
67 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="create program"
72 DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
75 AGGREGATE OUTFILE=* /BREAK=X /A=N.
80 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="run program"
83 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
84 if [ $? -ne 0 ] ; then fail ; fi
86 activity="appending to data"
87 # Put another 100,000 cases into large.dat
91 done ) | head -50000 >> $TEMPDIR/large.dat
92 if [ $? -ne 0 ] ; then no_result ; fi
94 activity="run program"
95 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
96 if [ $? -ne 0 ] ; then fail ; fi