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"
58 done ) | head -100000 >> $TEMPDIR/large.dat
59 if [ $? -ne 0 ] ; then no_result ; fi
63 done ) | head -100000 >> $TEMPDIR/large.dat
64 if [ $? -ne 0 ] ; then no_result ; fi
67 activity="create program"
68 cat > $TEMPDIR/large.sps <<EOF
69 DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
72 AGGREGATE /BREAK=X /A=N.
77 if [ $? -ne 0 ] ; then no_result ; fi
79 activity="run program"
80 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/large.sps > /dev/null
81 if [ $? -ne 0 ] ; then fail ; fi
83 activity="appending to data"
84 # Put another 100,000 cases into large.dat
88 done ) | head -50000 >> $TEMPDIR/large.dat
89 if [ $? -ne 0 ] ; then no_result ; fi
91 activity="run program"
92 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/large.sps > /dev/null
93 if [ $? -ne 0 ] ; then fail ; fi