Fixed blank replacement
[pspp] / tests / command / examine-extremes.sh
index e7ce31212192a4bac445a4013bfb2f4f5cd878bf..538d0897f7b79ca67a261745e888f04a40e4f3f4 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
 }
 
@@ -87,7 +89,8 @@ $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare results"
-diff -b -B $TEMPDIR/pspp.list - << EOF
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - << EOF
 1.1 EXAMINE.  Case Processing Summary
 #==#===============================#
 #  #             Cases             #
@@ -98,7 +101,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #==#==#=======#=#=======#==#=======#
 #V1#23|   100%|0|     0%|23|   100%#
 #==#==#=======#=#=======#==#=======#
-
 1.2 EXAMINE.  Extreme Values
 #==========#===========#=====#
 #          #Case Number|Value#
@@ -117,7 +119,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #         5#          3| 3.00#
 #         6#          5| 4.00#
 #==========#===========#=====#
-
 EOF
 if [ $? -ne 0 ] ; then fail ; fi