Fixed blank replacement
[pspp-builds.git] / tests / expressions / randist.sh
index 0f303879736dcacf432e0a892992e5a40fcf124d..bb02172f48ba65f2882f1515e00dd2cdcf0a1ff2 100755 (executable)
@@ -9,13 +9,18 @@ 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()
 {
+     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
+        echo NOT removing directory $TEMPDIR
+       return ; 
+     fi
+     cd /
      rm -rf $TEMPDIR
-     :
 }
 
 
@@ -59,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