Fix double-free bug.
[pspp] / tests / command / list.sh
index b73684d1ce3d23fe2a0ca852abd17afbd6d16370..c1e67dd4c96376978b30eaa51b34580ee69cf189 100755 (executable)
@@ -3,6 +3,7 @@
 # This program tests the LIST command.
 
 TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
 
 here=`pwd`;
 
@@ -47,7 +48,7 @@ cd $TEMPDIR
 
 
 activity="create program"
-cat > $TEMPDIR/list.stat << foobar
+cat > $TESTFILE << EOF
 *** Single lines.
 data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10.
 weight by BVAR.
@@ -61,11 +62,11 @@ data list file='$top_srcdir/tests/list.data' notable /X000 to X126 1-127.
 list x000 to x030.
 list /cases=from 1 to 25.
 
-foobar
+EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/list.stat
+$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi