RENAME VARIABLES: Convert tests to Autotest framework.
[pspp-builds.git] / tests / command / regression-qr.sh
index 5f4936d81b6cdf8ba06d4f60848cdedc4e678736..fd33cb802f6c22b4e37e5e86e20aa0f452773067 100755 (executable)
@@ -9,7 +9,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps
 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
 top_builddir=`cd $top_builddir; pwd`
-PSPP=$top_builddir/src/ui/terminal/pspp
+PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
 
 # ensure that top_srcdir is absolute
 top_srcdir=`cd $top_srcdir; pwd`
@@ -1566,40 +1566,30 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-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|
-#========#======#
-|v0      |F8.0  |
-|v1      |F8.0  |
-+--------+------+
-2.1 REGRESSION.  Model Summary
-#============#========#=================#==========================#
-#          R #R Square|Adjusted R Square|Std. Error of the Estimate#
-#========#===#========#=================#==========================#
-#        |.05#     .00|              .00|                      8.11#
-#========#===#========#=================#==========================#
-2.2 REGRESSION.  ANOVA
-#===================#==============#====#===========#=====#============#
-#                   #Sum of Squares| df |Mean Square|  F  |Significance#
-#========#==========#==============#====#===========#=====#============#
-#        |Regression#        235.23|   1|    235.232|3.580|        .059#
-#        |Residual  #      98438.40|1498|     65.713|     |            #
-#        |Total     #      98673.63|1499|           |     |            #
-#========#==========#==============#====#===========#=====#============#
-2.3 REGRESSION.  Coefficients
-#===================#====#==========#====#====#============#
-#                   #  B |Std. Error|Beta|  t |Significance#
-#========#==========#====#==========#====#====#============#
-#        |(Constant)#1.24|       .42| .00|2.95|         .21#
-#        |    v1    #1.37|       .72| .05|1.89|         .06#
-#        |          #    |          |    |    |            #
-#========#==========#====#==========#====#====#============#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Reading free-form data from INLINE.
+Variable,Format
+v0,F8.0
+v1,F8.0
+
+Table: Model Summary
+,R,R Square,Adjusted R Square,Std. Error of the Estimate
+,.05,.00,.00,8.11
+
+Table: ANOVA
+,,Sum of Squares,df,Mean Square,F,Significance
+,Regression,235.23,1,235.23,3.58,.06
+,Residual,98438.40,1498,65.71,,
+,Total,98673.63,1499,,,
+
+Table: Coefficients
+,,B,Std. Error,Beta,t,Significance
+,(Constant),1.24,.42,.00,2.95,.21
+,v1,1.37,.72,.05,1.89,.06
+,,,,,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi