tests: Convert multipass.sh test to Autotest framework.
[pspp-builds.git] / tests / language / stats / descriptives.at
index ec05f1b99759988259b32df1f443b2a3be3d1ca2..9c6be8d38fe3d3225423c4dddaaa6a55a494763a 100644 (file)
@@ -157,3 +157,31 @@ Variable,N,Mean
 X,6,2.500
 ])
 AT_CLEANUP
+
+dnl Git history shows that this was probably a bug in the PSPP
+dnl core regarding multipass procedures, not anything specific
+dnl to DESCRIPTIVES.
+AT_SETUP([DESCRIPTIVES bug with TEMPORARY])
+AT_DATA([descriptives.sps], [dnl
+DATA LIST LIST NOTABLE /id * abc *.
+BEGIN DATA.
+1 3.5
+2 2.0
+3 2.0
+4 3.5
+5 3.0
+6 4.0
+7 5.0
+END DATA.
+
+TEMPORARY.
+SELECT IF id < 7 .
+
+DESCRIPTIVES /VAR=abc.
+])
+AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl
+Table: Valid cases = 6; cases with missing value(s) = 0.
+Variable,N,Mean,Std Dev,Minimum,Maximum
+abc,6,3.00,.84,2.00,4.00
+])
+AT_CLEANUP