Fix double-free bug.
[pspp] / tests / bugs / get.sh
index 3a57df03443a60abf950cc0189c1123ee0204bb5..824d93c3617a1988f110309a13b729dbd1d7cb17 100755 (executable)
@@ -1,10 +1,11 @@
 #!/bin/sh
 
 # This program tests for a bug which caused
-# the second procedure after GET FILE to corrupt it's output
+# the second procedure after GET FILE to corrupt its output
 
 
 TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
 
 here=`pwd`;
 
@@ -48,8 +49,8 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="create program"
-cat > $TEMPDIR/prog.sps <<EOF
-DATA LIST LIST NOTABLE /location * editor * shell * freq * .
+cat > $TESTFILE <<EOF
+DATA LIST LIST NOTABLE /LOCATION * EDITOR * SHELL * FREQ * .
 BEGIN DATA.
     1.00     1.00    1.0     2.00
     1.00     1.00    2.0    30.00
@@ -74,11 +75,14 @@ LIST.
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
+
 activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/prog.sps
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
+
+
 activity="compare output"
 diff -b -B -w $TEMPDIR/pspp.list - << EOF
 LOCATION   EDITOR    SHELL     FREQ