replaced busted sed substitution with functioning perl substitutions
[pspp-builds.git] / tests / command / t-test-paired-missing-list.sh
index 5158a6a10ad06a3536b70e189dfd2d49a2659abd..01e4fbea6b998bed29a76e8fd88b27a14df6b3f2 100755 (executable)
@@ -4,17 +4,20 @@
 # when there is listwise missing data involved.
 
 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
 }
 
@@ -47,7 +50,7 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="create program 1"
-cat > $TEMPDIR/out.stat <<EOF
+cat > $TESTFILE <<EOF
 data list list /id * a * b * c * d *.
 begin data.
 1 2.0 3.0 4.0 4.0
@@ -63,7 +66,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 1"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="copy output"
@@ -71,7 +74,7 @@ mv $TEMPDIR/pspp.list $TEMPDIR/ref.list
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
-cat > $TEMPDIR/out.stat <<EOF
+cat > $TESTFILE <<EOF
 data list list /id * a * b * c * d *.
 begin data.
 1 2.0 3.0 4.0 4.0 
@@ -89,7 +92,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program 2"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi