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
54 activity="delete data"
55 rm -f $TEMPDIR/large.dat
56 if [ $? -ne 0 ] ; then no_result ; fi
58 printf "Creating input data. Please wait"
59 activity="create data"
60 $PERL -e 'print "AB12\n" foreach 1...100000;
61 print "AB04\n" foreach 1...100000;' > $TEMPDIR/large.dat
62 if [ $? -ne 0 ] ; then no_result ; fi
65 activity="create program"
67 DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
70 AGGREGATE OUTFILE=* /BREAK=X /A=N.
75 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="run program"
78 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
79 if [ $? -ne 0 ] ; then fail ; fi
81 activity="appending to data"
82 # Put another 100,000 cases into large.dat
83 $PERL -e 'print "AB04\nAB12\n" foreach 1...25000' >> $TEMPDIR/large.dat
84 if [ $? -ne 0 ] ; then no_result ; fi
86 activity="run program"
87 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
88 if [ $? -ne 0 ] ; then fail ; fi