3 # This program tests for a bug which caused a crash when
4 # very large files are presented.
7 TEMPDIR=/tmp/pspp-tst-$$
11 # ensure that top_srcdir is absolute
12 cd $top_srcdir; top_srcdir=`pwd`
14 export STAT_CONFIG_PATH=$top_srcdir/config
50 activity="delete data"
51 rm -f $TEMPDIR/large.dat
52 if [ $? -ne 0 ] ; then no_result ; fi
54 printf "Creating input data. Please wait"
55 activity="create data"
57 while [ $i -lt 100000 ] ; do
58 echo AB12 >> $TEMPDIR/large.dat;
63 while [ $i -lt 100000 ] ; do
64 echo AB04 >> $TEMPDIR/large.dat;
67 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="create program"
71 cat > $TEMPDIR/large.sps <<EOF
72 DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
75 AGGREGATE /BREAK=X /A=N.
80 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="run program"
83 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/large.sps > /dev/null
84 if [ $? -ne 0 ] ; then fail ; fi
87 activity="appending to data"
88 # Put another 100,000 cases into large.dat
90 while [ $i -lt 50000 ] ; do
91 echo AB04 >> $TEMPDIR/large.dat;
92 echo AB12 >> $TEMPDIR/large.dat;
95 if [ $? -ne 0 ] ; then no_result ; fi
97 activity="run program"
98 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/large.sps > /dev/null
99 if [ $? -ne 0 ] ; then fail ; fi