Fixed blank-line replacement
[pspp-builds.git] / tests / stats / percentiles-compatible.sh
index 74afea475388e0950f25ca2f57673fb671a78840..fbd275aed847b7c51f61a8a5e3240b88249e4031 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
      :
 }
@@ -52,7 +54,7 @@ i=1;
 
 activity="create program $i"
 cat > $TEMPDIR/prog.sps <<EOF
-DATA LIST LIST notable /x * .
+DATA LIST LIST notable /X * .
 BEGIN DATA.
 1 
 2 
@@ -74,7 +76,8 @@ $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/prog.sps
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output $i"
-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 FREQUENCIES.  X: 
 +-----------+--------+---------+--------+--------+--------+
 |           |        |         |        |  Valid |   Cum  |