Rewrite PSPP output engine.
[pspp-builds.git] / tests / stats / descript-missing.sh
index 9de2770e1e5ae3bf1007636d84db803278926f19..fce8a17ecdf843e15424e193885173d23bfe092e 100755 (executable)
@@ -87,48 +87,38 @@ $SUPERVISOR $PSPP --testing-mode $TEMPDIR/descript.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from INLINE.
-+--------+------+-------+------+
-|Variable|Record|Columns|Format|
-#========#======#=======#======#
-|V1      |     1|  1-  1|F1.0  |
-|V2      |     1|  2-  2|F1.0  |
-|V3      |     1|  3-  3|F1.0  |
-+--------+------+-------+------+
-2.1 DESCRIPTIVES.  Valid cases = 7; cases with missing value(s) = 6.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum|
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#====#
-|V1      #      1|        6|2.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   2.00|   2.00|2.00|
-|V2      #      2|        5|2.50|      .50|    .71|     .50|     .  |      .  |     .  |      .  | 1.00|   2.00|   3.00|5.00|
-|V3      #      3|        4|3.00|      .58|   1.00|    1.00|     .  |      .  |     .00|     1.22| 2.00|   2.00|   4.00|9.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-3.1 DESCRIPTIVES.  Valid cases = 7; cases with missing value(s) = 3.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum |
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#=====#
-|V1      #      5|        2|1.20|      .20|    .45|     .20|    5.00|     2.00|    2.24|      .91| 1.00|   1.00|   2.00| 6.00|
-|V2      #      5|        2|1.60|      .40|    .89|     .80|     .31|     2.00|    1.26|      .91| 2.00|   1.00|   3.00| 8.00|
-|V3      #      5|        2|2.20|      .58|   1.30|    1.70|   -1.49|     2.00|     .54|      .91| 3.00|   1.00|   4.00|11.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-4.1 DESCRIPTIVES.  Valid cases = 1; cases with missing value(s) = 6.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum|
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#====#
-|V1      #      1|        0|2.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   2.00|   2.00|2.00|
-|V2      #      1|        0|3.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   3.00|   3.00|3.00|
-|V3      #      1|        0|4.00|      .  |    .  |     .  |     .  |      .  |     .  |      .  |  .00|   4.00|   4.00|4.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+----+
-5.1 DESCRIPTIVES.  Valid cases = 4; cases with missing value(s) = 3.
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
-|Variable#Valid N|Missing N|Mean|S.E. Mean|Std Dev|Variance|Kurtosis|S.E. Kurt|Skewness|S.E. Skew|Range|Minimum|Maximum| Sum |
-#========#=======#=========#====#=========#=======#========#========#=========#========#=========#=====#=======#=======#=====#
-|V1      #      4|        0|1.25|      .25|    .50|     .25|    4.00|     2.62|    2.00|     1.01| 1.00|   1.00|   2.00| 5.00|
-|V2      #      4|        0|1.75|      .48|    .96|     .92|   -1.29|     2.62|     .85|     1.01| 2.00|   1.00|   3.00| 7.00|
-|V3      #      4|        0|2.50|      .65|   1.29|    1.67|   -1.20|     2.62|     .00|     1.01| 3.00|   1.00|   4.00|10.00|
-+--------#-------+---------+----+---------+-------+--------+--------+---------+--------+---------+-----+-------+-------+-----+
+diff -c $TEMPDIR/pspp.csv - <<EOF
+Title: Test DESCRIPTIVES procedure
+
+Table: Reading 1 record from INLINE.
+Variable,Record,Columns,Format
+V1,1,1-  1,F1.0
+V2,1,2-  2,F1.0
+V3,1,3-  3,F1.0
+
+Table: Valid cases = 7; cases with missing value(s) = 6.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,1,6,2.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,2.00,2.00,2.00
+V2,2,5,2.50,.50,.71,.50,.  ,.  ,.  ,.  ,1.00,2.00,3.00,5.00
+V3,3,4,3.00,.58,1.00,1.00,.  ,.  ,.00,1.22,2.00,2.00,4.00,9.00
+
+Table: Valid cases = 7; cases with missing value(s) = 3.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,5,2,1.20,.20,.45,.20,5.00,2.00,2.24,.91,1.00,1.00,2.00,6.00
+V2,5,2,1.60,.40,.89,.80,.31,2.00,1.26,.91,2.00,1.00,3.00,8.00
+V3,5,2,2.20,.58,1.30,1.70,-1.49,2.00,.54,.91,3.00,1.00,4.00,11.00
+
+Table: Valid cases = 1; cases with missing value(s) = 6.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,1,0,2.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,2.00,2.00,2.00
+V2,1,0,3.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,3.00,3.00,3.00
+V3,1,0,4.00,.  ,.  ,.  ,.  ,.  ,.  ,.  ,.00,4.00,4.00,4.00
+
+Table: Valid cases = 4; cases with missing value(s) = 3.
+Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
+V1,4,0,1.25,.25,.50,.25,4.00,2.62,2.00,1.01,1.00,1.00,2.00,5.00
+V2,4,0,1.75,.48,.96,.92,-1.29,2.62,.85,1.01,2.00,1.00,3.00,7.00
+V3,4,0,2.50,.65,1.29,1.67,-1.20,2.62,.00,1.01,3.00,1.00,4.00,10.00
 EOF
 if [ $? -ne 0 ] ; then fail ; fi