Revise.
[pspp] / tests / command / oneway-missing.sh
index 76ab99eaaac38d13044cc23f485519c3101fee5d..533a90a8c67e2be657a2f2b8cfadad8d741e2429 100755 (executable)
@@ -3,17 +3,20 @@
 # This program tests that the ONEWAY anova command works OK when there is missing data
 
 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
 }
 
@@ -46,7 +49,7 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="create program"
-cat > $TEMPDIR/out.stat <<EOF
+cat > $TESTFILE <<EOF
 DATA LIST LIST /v1 * v2 * dep * vn *.
 BEGIN DATA
 . .  1  4
@@ -77,7 +80,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$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"
@@ -85,7 +88,7 @@ cp $TEMPDIR/pspp.list $TEMPDIR/pspp.list1
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="create program 2"
-cat > $TEMPDIR/out.stat <<EOF
+cat > $TESTFILE <<EOF
 DATA LIST LIST /v1 * v2 * dep * vn * .
 BEGIN DATA
 4 .  1  2 
@@ -115,7 +118,7 @@ EOF
 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
 
 activity="compare outputs"
@@ -125,7 +128,7 @@ if [ $? -ne 0 ] ; then fail ; fi
 # Now try a missing dependent variable
 # Everything depends upon it, so it should behave as if LISTWISE were set
 activity="create program 3"
-cat > $TEMPDIR/out.stat <<EOF
+cat > $TESTFILE <<EOF
 DATA LIST LIST /v1 * v2 * dep * vn * .
 BEGIN DATA
 4 2  .  2 
@@ -155,7 +158,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program 3"
-$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="compare outputs"