X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fctables.at;fp=tests%2Flanguage%2Fstats%2Fctables.at;h=1384710f8e7a697456fe5154b1fe3159d26f7d98;hb=573bdf24eadcb5a16c3fab8c87090e2120b04c0a;hp=e91301a0a5ed26f57c9af9130701e2cfb2e3861d;hpb=1b9ed07d1681f7744552a9e32e8136cffc2ae344;p=pspp diff --git a/tests/language/stats/ctables.at b/tests/language/stats/ctables.at index e91301a0a5..1384710f8e 100644 --- a/tests/language/stats/ctables.at +++ b/tests/language/stats/ctables.at @@ -12,13 +12,11 @@ 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 @@ -1198,4 +1196,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