Don't append -ansi to AM_CFLAGS for GCC. Using -ansi changes the
[pspp] / tests / bugs / get.sh
index 3a57df03443a60abf950cc0189c1123ee0204bb5..4fddea75d746bc368c6c34e090b6261cc6f6173c 100755 (executable)
@@ -1,21 +1,24 @@
 #!/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`;
 
 # ensure that top_srcdir is absolute
 cd $top_srcdir; top_srcdir=`pwd`
 
-export STAT_CONFIG_PATH=$top_srcdir/config
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
 
 
 cleanup()
 {
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -48,8 +51,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 +77,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