RELIABILITY: Convert tests to Autotest framework.
[pspp-builds.git] / tests / command / roc2.sh
index a8020b0c26c6c6f901cf1ce203fb69c5a35ac859..6cd9a44413e96dea1664951881fce93941dc5e9b 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`
@@ -101,30 +101,22 @@ 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
 
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  $TEMPDIR/pspp.list - << EOF
-1.1 ROC.  Case Summary
-#========#===================#
-#        # Valid N (listwise)#
-#        #==========#========#
-#a       #Unweighted|Weighted#
-#========#==========#========#
-#Positive#        14|  14.000#
-#Negative#        14|  14.000#
-#========#==========#========#
-1.2 ROC.  Area Under the Curve (x)
-#====#==========#===============#=======================#
-#    |          |               | Asymp. 95% Confidence #
-#    |          |               +-----------+-----------#
-#Area|Std. Error|Asymptotic Sig.|Lower Bound|Upper Bound#
-#====#==========#===============#===========#===========#
-#.490|      .111|           .927|       .307|       .673#
-#====#==========#===============#===========#===========#
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Case Summary
+,Valid N (listwise),
+a,Unweighted,Weighted
+Positive,14,14.000
+Negative,14,14.000
+
+Table: Area Under the Curve (x)
+,,,Asymp. 95% Confidence Interval,
+Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
+.490,.111,.927,.307,.673
 EOF
 if [ $? -ne 0 ] ; then fail ; fi