Made tests BSD diff compatible
[pspp] / tests / command / oneway.sh
index 6245ec8fd28e3d7e2941efdfad5c3392a4b620c3..5de916748dcc3df0e52af83a40d54e083ffc5d02 100755 (executable)
@@ -10,7 +10,8 @@ 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()
@@ -19,6 +20,7 @@ cleanup()
        echo Not cleaning $TEMPDIR;
        return ; 
     fi
+    cd /
     rm -rf $TEMPDIR
 }
 
@@ -90,7 +92,8 @@ activity="run program"
 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-diff -b -B $TEMPDIR/pspp.list - << EOF
+perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
 1.1 DATA LIST.  Reading free-form data from the command file.
 +--------+------+
 |Variable|Format|