Made tests BSD diff compatible
[pspp] / tests / command / filter.sh
index 59cf5b3b9c8b3499180853d81426953330b6f49e..b6ab48f046e202f58522152443873e1c5e3fa6ea 100755 (executable)
@@ -10,11 +10,13 @@ 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
 }
 
@@ -81,7 +83,8 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="check results"
-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'
  X FILTER_$
 -- --------
  1     1.00