legacy-encoding: Remove.
[pspp-builds.git] / tests / language / stats / oneway.at
index 47df1883925b90acec1c3e94eb0772359bdb8ae6..a0a3bafb745abeff97c97e06f8213a0bb328543c 100644 (file)
@@ -6,17 +6,17 @@ AT_DATA([oneway.sps],
 BEGIN DATA
 7  3
 4  3
-3 1
-2 1
-1 1
-4 2
-2 2
-3 2
+3  1
+2  1
+1  1
+4  2
+2  2
+3  2
 5  3
-1 1
-4 1
-5 2
-2 2
+1  1
+4  1
+5  2
+2  2
 3  3
 6  3
 END DATA
@@ -414,9 +414,9 @@ ONEWAY x y z by g
        /CONTRAST 2 -9 7  0
        .
 ])
-
-
-AT_CHECK([pspp -O format=csv multivar.sps], [0], 
+AT_CHECK([pspp -o pspp.csv multivar.sps])
+dnl Some machines return 3.88 instead of 3.87 below (see bug #31611).
+AT_CHECK([sed 's/^,Within Groups,3.88/,Within Groups,3.87/' pspp.csv], [0],
 [Table: Descriptives
 ,,,,,,95% Confidence Interval for Mean,,,
 ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum
@@ -477,3 +477,77 @@ z,Assume equal variances,1,-9.70,8.07,1.20,20,.24
 ])
 
 AT_CLEANUP
+
+
+
+dnl Tests that everything treats weights properly
+AT_SETUP([ONEWAY vs. weights])
+
+AT_DATA([oneway-unweighted.sps],
+[DATA LIST NOTABLE LIST /QUALITY * BRAND * W *.
+BEGIN DATA
+3  1   1
+2  1   1
+1  1   1
+1  1   1
+4  1   1
+5  2   1
+2  2   1
+4  2   1
+4  2   1
+4  2   1
+2  2   1
+2  2   1
+3  2   1
+7  3   1
+4  3   1
+5  3   1
+5  3   1
+3  3   1
+6  3   1
+END DATA.
+
+WEIGHT BY W.
+
+ONEWAY
+       quality BY brand
+       /STATISTICS descriptives homogeneity
+       .
+])
+
+AT_CHECK([pspp -o pspp-unweighted.csv oneway-unweighted.sps], [0], [ignore], [ignore])
+
+AT_DATA([oneway-weighted.sps],
+[DATA LIST NOTABLE LIST /QUALITY * BRAND * W *.
+BEGIN DATA
+3  1   1
+2  1   1
+1  1   2
+4  1   1
+5  2   1
+2  2   1
+4  2   3
+2  2   2
+3  2   1
+7  3   1
+4  3   1
+5  3   2
+3  3   1
+6  3   1
+END DATA.
+
+WEIGHT BY W.
+
+ONEWAY
+       quality BY brand
+       /STATISTICS descriptives homogeneity
+       .
+])
+
+AT_CHECK([pspp -o pspp-weighted.csv oneway-weighted.sps], [0], [ignore], [ignore])
+
+
+AT_CHECK([diff pspp-weighted.csv pspp-unweighted.csv], [0])
+
+
+AT_CLEANUP