Fixed blank replacement
[pspp] / tests / command / trimmed-mean.sh
index 80097a121f547fcc10d0147fdb1448929d12991f..0d65db5ef03e81dda3f76b984f8224868fdee23b 100755 (executable)
@@ -11,11 +11,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
 }
 
@@ -50,7 +52,7 @@ cd $TEMPDIR
 
 activity="create program"
 cat > $TESTFILE <<EOF
-DATA LIST LIST /x * c *.
+DATA LIST LIST /X * C *.
 BEGIN DATA.
 1 1
 2 49
@@ -73,7 +75,8 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-diff $TEMPDIR/pspp.list - << EOF
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - << EOF
 1.1 DATA LIST.  Reading free-form data from the command file.
 +--------+------+
 |Variable|Format|
@@ -81,7 +84,6 @@ diff $TEMPDIR/pspp.list - << EOF
 |X       |F8.0  |
 |C       |F8.0  |
 +--------+------+
-
 2.1 EXAMINE.  Case Processing Summary
 #=#===============================#
 # #             Cases             #
@@ -92,7 +94,6 @@ diff $TEMPDIR/pspp.list - << EOF
 #=#==#=======#=#=======#==#=======#
 #X#52|   100%|0|     0%|52|   100%#
 #=#==#=======#=#=======#==#=======#
-
 2.2 EXAMINE.  Descriptives
 #============================================#=========#==========#
 #                                            #Statistic|Std. Error#
@@ -111,7 +112,6 @@ diff $TEMPDIR/pspp.list - << EOF
 # Skewness                                   #  1.194  |   .330   #
 # Kurtosis                                   #  15.732 |   .650   #
 #============================================#=========#==========#
-
 EOF
 if [ $? -ne 0 ] ; then fail ; fi