CROSSTABS: (Re)implemented the format=DVALUE option.
[pspp-builds.git] / tests / language / stats / crosstabs.at
index e464d84631b4fd65940cf554d6e27d56c8c7210e..b0da517f9828f9dc7f032bc304a64b84082daf9b 100644 (file)
@@ -342,3 +342,39 @@ Total,,4.0,1.0,5.0
 Total,,3.0,1.0,4.0
 ]])
 AT_CLEANUP
+
+
+
+AT_SETUP([CROSSTABS descending sort order])
+AT_DATA([crosstabs-descending.sps],
+  [[DATA LIST NOTABLE LIST /x * y *.
+BEGIN DATA.
+2 2
+2 2
+3 1
+4 1
+3 2
+3 2
+END DATA.
+
+CROSSTABS
+        /TABLES= x BY y
+       /FORMAT = DVALUE.
+]])
+
+AT_CHECK([pspp -O format=csv crosstabs-descending.sps], [0],
+  [[Table: Summary.
+,Cases,,,,,
+,Valid,,Missing,,Total,
+,N,Percent,N,Percent,N,Percent
+x * y,6,100.0%,0,0.0%,6,100.0%
+
+Table: x * y [count].
+,y,,
+x,2.00,1.00,Total
+4.00,.0,1.0,1.0
+3.00,2.0,1.0,3.0
+2.00,2.0,.0,2.0
+Total,4.0,2.0,6.0
+]])
+AT_CLEANUP