Fixed blank replacement
[pspp-builds.git] / tests / expressions / randist.sh
index 102492ad45c98eb3227e3e5840206af5b1ff871c..bb02172f48ba65f2882f1515e00dd2cdcf0a1ff2 100755 (executable)
@@ -9,7 +9,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()
@@ -18,6 +19,7 @@ cleanup()
         echo NOT removing directory $TEMPDIR
        return ; 
      fi
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -62,7 +64,8 @@ if [ $? -ne 0 ] ; then fail ; fi
 for d in beta cauchy chisq exp f gamma laplace logistic lnormal \
         normal pareto t uniform weibull; do
     activity="compare output for $d distribution"
-    diff -B -b $top_srcdir/tests/expressions/randist/$d.out $TEMPDIR/$d.out
+    perl -pi -e 's/^\s*$//g' $top_srcdir/tests/expressions/randist/$d.out $TEMPDIR/$d.out
+    diff -b $top_srcdir/tests/expressions/randist/$d.out $TEMPDIR/$d.out
     if [ $? -ne 0 ] ; then fail ; fi
 done