Fixed blank-line replacement
[pspp-builds.git] / tests / stats / descript-basic.sh
index eaa39fcc9b44ac5ecb1aa4e15686e09cea9a6c5a..094c6cf170f6eb7f4aba46e83a2d80bf12328e90 100755 (executable)
@@ -9,11 +9,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
 }
 
@@ -49,7 +51,7 @@ activity="create program"
 cat > $TEMPDIR/descript.stat <<EOF
 title 'Test DESCRIPTIVES procedure'.
 
-data list / v0 to v16 1-17.
+data list / V0 to V16 1-17.
 begin data.
 12128989012389023
 34128080123890128
@@ -74,7 +76,8 @@ $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/descript.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-diff -B -b $TEMPDIR/pspp.list - <<EOF
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff  -b $TEMPDIR/pspp.list - <<EOF
 1.1 DATA LIST.  Reading 1 record from the command file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|
@@ -97,7 +100,6 @@ diff -B -b $TEMPDIR/pspp.list - <<EOF
 |V15     |     1| 16- 16|F1.0  |
 |V16     |     1| 17- 17|F1.0  |
 +--------+------+-------+------+
-
 2.1 DESCRIPTIVES.  Valid cases = 10; cases with missing value(s) = 0.
 +--------#-------+---------+-----+--------+-------+--------+--------+--------+--------+--------+-----+-------+-------+------+
 |Variable#Valid N|Missing N| Mean|S E Mean|Std Dev|Variance|Kurtosis|S E Kurt|Skewness|S E Skew|Range|Minimum|Maximum|  Sum |