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
12 # ensure that top_builddir are absolute
13 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
14 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
15 top_builddir=`cd $top_builddir; pwd`
16 PSPP=$top_builddir/src/ui/terminal/pspp
18 # ensure that top_srcdir is absolute
19 top_srcdir=`cd $top_srcdir; pwd`
21 STAT_CONFIG_PATH=$top_srcdir/config
22 export STAT_CONFIG_PATH
59 activity="delete data"
60 rm -f $TEMPDIR/large.dat
61 if [ $? -ne 0 ] ; then no_result ; fi
63 printf "Creating input data. Please wait"
64 activity="create data"
65 $PERL -e 'for ($i=0; $i<100000; $i++) { print "AB12\n" };
66 for ($i=0; $i<100000; $i++) { print "AB04\n" };' > $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 $PSPP --testing-mode -e /dev/null $TESTFILE
84 if [ $? -ne 0 ] ; then fail ; fi
86 activity="appending to data"
87 # Put another 50,000 cases into large.dat
88 $PERL -e 'for ($i=0; $i<25000; $i++) { print "AB04\nAB12\n" };' >> $TEMPDIR/large.dat
89 if [ $? -ne 0 ] ; then no_result ; fi
91 activity="run program"
92 $SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE
93 if [ $? -ne 0 ] ; then fail ; fi