)TABLE, )DATE, )TIME
[pspp] / tests / language / stats / ctables.at
index e91301a0a5ed26f57c9af9130701e2cfb2e3861d..a5ae1eebf0f00d03b6816bd63e77287bd5f8efff 100644 (file)
@@ -2,7 +2,6 @@ AT_BANNER([CTABLES])
 
 dnl Features not yet implemented:
 dnl
-dnl - Date/time variables and values
 dnl - SPLIT FILE with SEPARATE splits
 dnl - Definition of columns/rows when labels are rotated from one axis to another.
 dnl - Preprocessing to distinguish categorical from scale.
@@ -12,13 +11,8 @@ dnl   * Unimplemented ones.
 dnl   * U-prefix for unweighted summaries.
 dnl   * .LCL and .UCL suffixes.
 dnl   * .SE suffixes.
-dnl   * Why are summary functions for scale variables also available for totals and subtotals?
 dnl - CATEGORIES:
-dnl   * String values
-dnl   * Date values
 dnl   * Data-dependent sorting.
-dnl - TITLES: )DATE, )TIME, )TABLE.
-dnl - SMISSING (see documentation).
 dnl - PCOMPUTE:
 dnl   * multi-dimensional
 dnl   * MISSING, OTHERNM
@@ -26,7 +20,6 @@ dnl   * strings
 dnl - PPROPERTIES:
 dnl   * )LABEL[N].
 dnl   * summary statistics and formats?
-dnl - Are string ranges a thing?
 dnl
 dnl Features not yet tested:
 dnl - Parsing (positive and negative)
@@ -36,17 +29,23 @@ dnl - test CLABELS ROWLABELS=LAYER.
 dnl - Test VLABELS.
 dnl - Test WEIGHT and adjustment weights.
 dnl - Test PCOMPUTE and PPROPERTIES.
+dnl - EMPTY=INCLUDE For string ranges.
 dnl - Summary functions:
 dnl   * Separate summary functions for totals and subtotals.
 dnl - CATEGORIES:
-dnl   * THRU
+dnl   * String values
+dnl   * Date values
+dnl   * THRU (numeric ranges)
+dnl   * THRU (string ranges)
 dnl   * OTHERNM
 dnl - FORMAT:
 dnl   * MINCOLWIDTH, MAXCOLWIDTH, UNITS.
 dnl   * EMPTY.
 dnl   * MISSING.
 dnl - HIDESMALLCOUNTS.
+dnl - Date/time variables and values
 dnl - Special formats for summary functions: NEGPAREN, NEQUAL, PAREN, PCTPAREN.
+dnl - TITLES: )DATE, )TIME, )TABLE.
 dnl
 dnl Not for v1:
 dnl - Multiple response sets
@@ -1198,4 +1197,54 @@ dnl is expected behavior.
 │        Total N         │     5│     5│     5│     5│    30│
 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
 ])
-AT_CLEANUP
\ No newline at end of file
+AT_CLEANUP
+
+AT_SETUP([CTABLES SMISSING=LISTWISE])
+AT_KEYWORDS([SMISSING LISTWISE])
+AT_DATA([ctables.sps],
+[[DATA LIST LIST NOTABLE/x y z.
+BEGIN DATA.
+1  . 40
+1 10 50
+1 20 60
+1  .  .
+1 30  .
+END DATA.
+VARIABLE LEVEL x (NOMINAL).
+
+CTABLES /TABLE (y + z) > x.
+CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
+
+* The following doesn't come out as listwise because the tables are
+separate, not linked by an > operator.
+CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
+]])
+AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
+  Custom Tables
+╭────────┬─────╮
+│        │ Mean│
+├────────┼─────┤
+│y x 1.00│20.00│
+├────────┼─────┤
+│z x 1.00│50.00│
+╰────────┴─────╯
+
+  Custom Tables
+╭────────┬─────╮
+│        │ Mean│
+├────────┼─────┤
+│y x 1.00│15.00│
+├────────┼─────┤
+│z x 1.00│55.00│
+╰────────┴─────╯
+
+  Custom Tables
+╭────────┬─────╮
+│        │ Mean│
+├────────┼─────┤
+│y x 1.00│20.00│
+├────────┼─────┤
+│z x 1.00│50.00│
+╰────────┴─────╯
+])
+AT_CLEANUP