Add scratch file handles.
[pspp-builds.git] / tests / command / examine.sh
index 102a44bff676a8181f6f548e2432a6b74693aba5..4ce0257afffe9bbbf491d74cbfd02f74f2d7c83a 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
 }
 
@@ -92,8 +94,9 @@ if [ $? -ne 0 ] ; then no_result ; fi
 # NOTE:  In the following data: Only the extreme values have been checked
 # The descriptives have been blindly pasted.
 activity="compare results"
-diff -b -B $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from the command file.
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - << EOF
+1.1 DATA LIST.  Reading free-form data from INLINE.
 +--------+------+
 |Variable|Format|
 #========#======#
@@ -101,7 +104,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 |W       |F8.0  |
 |BRAND   |F8.0  |
 +--------+------+
-
 Case#  QUALITY        W    BRAND
 ----- -------- -------- --------
     1     3.00     1.00     1.00 
@@ -120,7 +122,6 @@ Case#  QUALITY        W    BRAND
    14     5.00     3.00     3.00 
    15     3.00     1.00     3.00 
    16     6.00     1.00     3.00 
-
 2.1 EXAMINE.  Case Processing Summary
 #===============#===============================#
 #               #             Cases             #
@@ -131,7 +132,6 @@ Case#  QUALITY        W    BRAND
 #===============#==#=======#=#=======#==#=======#
 #Breaking Strain#24|   100%|0|     0%|24|   100%#
 #===============#==#=======#=#=======#==#=======#
-
 2.2 EXAMINE.  Extreme Values
 #=======================#===========#=====#
 #                       #Case Number|Value#
@@ -144,7 +144,6 @@ Case#  QUALITY        W    BRAND
 #                      2#          3| 1.00#
 #                      3#          3| 1.00#
 #=======================#===========#=====#
-
 2.3 EXAMINE.  Descriptives
 #==========================================================#=========#==========#
 #                                                          #Statistic|Std. Error#
@@ -163,7 +162,6 @@ Case#  QUALITY        W    BRAND
 #               Skewness                                   #   .059  |   .472   #
 #               Kurtosis                                   #  -.358  |   .918   #
 #==========================================================#=========#==========#
-
 2.4 EXAMINE.  Case Processing Summary
 #===========================#=============================#
 #                           #            Cases            #
@@ -176,7 +174,6 @@ Case#  QUALITY        W    BRAND
 #               Bloggs      #8|   100%|0|     0%|8|   100%#
 #               Charlies    #8|   100%|0|     0%|8|   100%#
 #===========================#=#=======#=#=======#=#=======#
-
 2.5 EXAMINE.  Extreme Values
 #===================================#===========#=====#
 #               Manufacturer        #Case Number|Value#
@@ -205,7 +202,6 @@ Case#  QUALITY        W    BRAND
 #                                  2#         13| 4.00#
 #                                  3#         13| 4.00#
 #===================================#===========#=====#
-
 2.6 EXAMINE.  Descriptives
 #======================================================================#=========#==========#
 #               Manufacturer                                           #Statistic|Std. Error#
@@ -252,7 +248,6 @@ Case#  QUALITY        W    BRAND
 #                           Skewness                                   #   .304  |   .752   #
 #                           Kurtosis                                   #   .146  |   1.481  #
 #======================================================================#=========#==========#
-
 EOF
 if [ $? -ne 0 ] ; then fail ; fi