From 2e25974c64e911e448f09dee46b9330c9121bbdd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 29 Jun 2022 19:19:18 -0700 Subject: [PATCH] more missing value tests --- tests/language/stats/ctables.at | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/language/stats/ctables.at b/tests/language/stats/ctables.at index 8f038da121..49525da66f 100644 --- a/tests/language/stats/ctables.at +++ b/tests/language/stats/ctables.at @@ -983,7 +983,7 @@ END DATA. MISSING VALUES x (1, 2) y (2, 3). VARIABLE LEVEL ALL (NOMINAL). -*TABLES /TABLE x[COUNT, TOTALS[COUNT, VALIDN, TOTALN]] +CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]] /CATEGORIES VARIABLES=ALL TOTAL=YES. CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE. @@ -996,6 +996,19 @@ AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮ │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│ ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤ +│x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │ +│ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │ +│ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │ +│ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│ +╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯ +dnl Note that Column Total N % doesn't add up to 100 because missing +dnl values are included in the total but not shown as a category and this +dnl is expected behavior. + + Custom Tables +╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮ +│ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│ +├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤ │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │ │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │ │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │ @@ -1003,7 +1016,7 @@ AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │ │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│ ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯ -dnl Note that the Total N % doesn't add up to 100 because system-missing +dnl Note that Column Total N % doesn't add up to 100 because system-missing dnl values are included in the total but not shown as a category and this dnl is expected behavior. ]) -- 2.30.2