X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fcorrelation.sh;h=d66e52c7aed32223da28a39102ec28ea61445d61;hb=add3ba666ddc4f88fbf0934184c82e35c0787795;hp=d8fcb1cbbcb1893dfc8ff31c65d1be4b060b418f;hpb=c8377117389554c8e914052a46b03aa8bcae8364;p=pspp diff --git a/tests/command/correlation.sh b/tests/command/correlation.sh index d8fcb1cbbc..d66e52c7ae 100755 --- a/tests/command/correlation.sh +++ b/tests/command/correlation.sh @@ -11,7 +11,7 @@ if [ -z "$top_builddir" ] ; then top_builddir=. ; fi top_srcdir=`cd $top_srcdir; pwd` top_builddir=`cd $top_builddir; pwd` -PSPP=$top_builddir/src/ui/terminal/pspp +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH @@ -94,58 +94,43 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program 1" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare results 1" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << EOF -1.1 CORRELATIONS. Correlations -#========================#=====#=====#=====#=====# -# #foo |bar |wiz |bang # -#----+-------------------#-----+-----+-----+-----# -#foo |Pearson Correlation#1.000| .802| .890|-.308# -# |Sig. (2-tailed) # | .055| .017| .553# -#----+-------------------#-----+-----+-----+-----# -#bar |Pearson Correlation# .802|1.000| .519| .118# -# |Sig. (2-tailed) # .055| | .291| .824# -#----+-------------------#-----+-----+-----+-----# -#wiz |Pearson Correlation# .890| .519|1.000|-.344# -# |Sig. (2-tailed) # .017| .291| | .505# -#----+-------------------#-----+-----+-----+-----# -#bang|Pearson Correlation#-.308| .118|-.344|1.000# -# |Sig. (2-tailed) # .553| .824| .505| # -#====#===================#=====#=====#=====#=====# -2.1 CORRELATIONS. Correlations -#=======================#=====#=====# -# #bar |wiz # -#---+-------------------#-----+-----# -#bar|Pearson Correlation#1.000| .497# -# |Sig. (2-tailed) # | .210# -#---+-------------------#-----+-----# -#wiz|Pearson Correlation# .497|1.000# -# |Sig. (2-tailed) # .210| # -#===#===================#=====#=====# -3.1 CORRELATIONS. Correlations -#========================#=====#=====#=====#=====# -# #foo |bar |wiz |bang # -#----+-------------------#-----+-----+-----+-----# -#foo |Pearson Correlation#1.000| .805| .883|-.308# -# |Sig. (2-tailed) # | .029| .008| .553# -# |N # 7| 7| 7| 6# -#----+-------------------#-----+-----+-----+-----# -#bar |Pearson Correlation# .805|1.000| .497| .164# -# |Sig. (2-tailed) # .029| | .210| .725# -# |N # 7| 8| 8| 7# -#----+-------------------#-----+-----+-----+-----# -#wiz |Pearson Correlation# .883| .497|1.000|-.337# -# |Sig. (2-tailed) # .008| .210| | .460# -# |N # 7| 8| 8| 7# -#----+-------------------#-----+-----+-----+-----# -#bang|Pearson Correlation#-.308| .164|-.337|1.000# -# |Sig. (2-tailed) # .553| .725| .460| # -# |N # 6| 7| 7| 7# -#====#===================#=====#=====#=====#=====# +diff -c $TEMPDIR/pspp.csv - << EOF +Table: Correlations +,,foo,bar,wiz,bang +foo,Pearson Correlation,1.000,.802,.890,-.308 +,Sig. (2-tailed),,.055,.017,.553 +bar,Pearson Correlation,.802,1.000,.519,.118 +,Sig. (2-tailed),.055,,.291,.824 +wiz,Pearson Correlation,.890,.519,1.000,-.344 +,Sig. (2-tailed),.017,.291,,.505 +bang,Pearson Correlation,-.308,.118,-.344,1.000 +,Sig. (2-tailed),.553,.824,.505, + +Table: Correlations +,,bar,wiz +bar,Pearson Correlation,1.000,.497 +,Sig. (2-tailed),,.210 +wiz,Pearson Correlation,.497,1.000 +,Sig. (2-tailed),.210, + +Table: Correlations +,,foo,bar,wiz,bang +foo,Pearson Correlation,1.000,.805,.883,-.308 +,Sig. (2-tailed),,.029,.008,.553 +,N,7,7,7,6 +bar,Pearson Correlation,.805,1.000,.497,.164 +,Sig. (2-tailed),.029,,.210,.725 +,N,7,8,8,7 +wiz,Pearson Correlation,.883,.497,1.000,-.337 +,Sig. (2-tailed),.008,.210,,.460 +,N,7,8,8,7 +bang,Pearson Correlation,-.308,.164,-.337,1.000 +,Sig. (2-tailed),.553,.725,.460, +,N,6,7,7,7 EOF if [ $? -ne 0 ] ; then fail ; fi @@ -177,11 +162,11 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program 2" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="copy results" -cp $TEMPDIR/pspp.list $TEMPDIR/weighted +cp $TEMPDIR/pspp.csv $TEMPDIR/weighted if [ $? -ne 0 ] ; then no_result ; fi activity="create program 3" @@ -211,11 +196,11 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 3" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="Compare weighted and unweighted results" -diff $TEMPDIR/pspp.list $TEMPDIR/weighted +diff $TEMPDIR/pspp.csv $TEMPDIR/weighted if [ $? -ne 0 ] ; then fail ; fi pass;