"Fix" PR 13021 by disabling FILE TYPE.
[pspp] / tests / bugs / big-input-2.sh
index ee29226bf370390aaefc9783700cc5649b8b3507..9f6cd341a4e76dd9c29cd24c2cd2585f31234041 100755 (executable)
@@ -5,6 +5,8 @@
 
 
 TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
+TESTFILE=$TEMPDIR/`basename $0`.sps
 
 here=`pwd`;
 
@@ -53,26 +55,23 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 printf "Creating input data.  Please wait"
 activity="create data"
-i=0
-while [ $i -lt 100000 ] ; do 
-       echo AB12 >> $TEMPDIR/large.dat;
-       i=$[$i + 1];
-done;
+( while true ; do 
+       echo AB12;
+done )  | head -100000 >> $TEMPDIR/large.dat
+if [ $? -ne 0 ] ; then no_result ; fi
 printf '.'
-i=0
-while [ $i -lt 100000 ] ; do 
-       echo AB04 >> $TEMPDIR/large.dat;
-       i=$[$i + 1];
-done;
+( while true ; do 
+       echo AB04;
+done )  | head -100000 >> $TEMPDIR/large.dat
 if [ $? -ne 0 ] ; then no_result ; fi
 printf "\n";
 
 activity="create program"
-cat > $TEMPDIR/large.sps <<EOF
+cat > $TESTFILE <<EOF
 DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
 
 
-AGGREGATE /BREAK=X /A=N.
+AGGREGATE OUTFILE=* /BREAK=X /A=N.
 
 
 EXAMINE /A BY /X.
@@ -80,24 +79,19 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/large.sps > /dev/null
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
 if [ $? -ne 0 ] ; then fail ; fi
 
-
 activity="appending to data"
 # Put another 100,000 cases into large.dat
-i=0
-while [ $i -lt 50000 ] ; do 
-       echo AB04 >> $TEMPDIR/large.dat;
-       echo AB12 >> $TEMPDIR/large.dat;
-       i=$[$i + 1];
-done;
+( while true ; do 
+       echo AB04 
+       echo AB12 
+done )  | head -50000 >> $TEMPDIR/large.dat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/large.sps > /dev/null
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE > /dev/null
 if [ $? -ne 0 ] ; then fail ; fi
 
-
-
 pass;