FACTOR: prevent crash if the dataset is empty.
[pspp-builds.git] / tests / language / stats / factor.at
index f1d4b2360b6f798c78b9f67ecfba0ec30e8a204b..ca01ca80513a2e800f996967e1f085eefefe5c9a 100644 (file)
@@ -1775,4 +1775,24 @@ science,.900,.198
 socst,.222,.922
 ])
 
-AT_CLEANUP
\ No newline at end of file
+AT_CLEANUP
+
+
+
+AT_SETUP([FACTOR empty dataset])
+dnl Test that something sane happens when the dataset contains no complete observations
+
+AT_DATA([factor-empty.sps],
+  [data list notable list /x * y * z *.
+begin data.
+3.4        .     92.9
+.        32.09   34.2
+1.00     19.80     .
+2.00       .      3.6
+end data.
+
+factor /variables = ALL.
+])
+
+AT_CHECK([pspp -O format=csv factor-empty.sps], [0], [ignore])
+AT_CLEANUP