From 1d4fc671cfe2ea6983198293c3211c4270d58084 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 4 Aug 2022 16:01:18 -0700 Subject: [PATCH] test vlabels --- tests/language/stats/ctables.at | 107 +++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/tests/language/stats/ctables.at b/tests/language/stats/ctables.at index ff60efa8df..ef606146dc 100644 --- a/tests/language/stats/ctables.at +++ b/tests/language/stats/ctables.at @@ -3,7 +3,6 @@ AT_BANNER([CTABLES]) dnl Features not yet tested: dnl - Preprocessing to distinguish categorical from scale. dnl - Testing details of missing value handling in summaries. -dnl - Test VLABELS. dnl - Test WEIGHT and adjustment weights. dnl - Summary functions: dnl * Separate summary functions for totals and subtotals. @@ -2073,3 +2072,109 @@ AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl ╰────────┴─────╯ ]) AT_CLEANUP + +AT_SETUP([CTABLES VLABELS]) +AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .]) +AT_DATA([ctables.sps], +[[GET 'nhtsa.sav'. +CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a. +CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NAME /TABLE qnd5a BY qns3a. +CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=LABEL /TABLE qnd5a BY qns3a. +CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=BOTH /TABLE qnd5a BY qns3a. +CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a BY qns3a. +]]) +AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl + Custom Tables +╭────────────────────────────────────────────────────────────────┬────────────╮ +│ │S3a. GENDER:│ +│ ├─────┬──────┤ +│ │ Male│Female│ +│ ├─────┼──────┤ +│ │Count│ Count│ +├────────────────────────────────────────────────────────────────┼─────┼──────┤ +│D5a. What would you say is your primary Cuban │ 13│ 7│ +│ethnic background? Mexican │ 175│ 136│ +│ Spanish │ 20│ 28│ +│ South American │ 21│ 13│ +│ Central American │ 27│ 25│ +│ Puerto Rican, OR │ 37│ 41│ +│ Something else │ 35│ 33│ +│ Multiple - cannot │ 2│ 5│ +│ choose one │ │ │ +╰────────────────────────────────────────────────────────────────┴─────┴──────╯ + + Custom Tables +╭──────────────────────────────────┬────────────╮ +│ │ QNS3A │ +│ ├─────┬──────┤ +│ │ Male│Female│ +│ ├─────┼──────┤ +│ │Count│ Count│ +├──────────────────────────────────┼─────┼──────┤ +│QND5A Cuban │ 13│ 7│ +│ Mexican │ 175│ 136│ +│ Spanish │ 20│ 28│ +│ South American │ 21│ 13│ +│ Central American │ 27│ 25│ +│ Puerto Rican, OR │ 37│ 41│ +│ Something else │ 35│ 33│ +│ Multiple - cannot choose one│ 2│ 5│ +╰──────────────────────────────────┴─────┴──────╯ + + Custom Tables +╭────────────────────────────────────────────────────────────────┬────────────╮ +│ │S3a. GENDER:│ +│ ├─────┬──────┤ +│ │ Male│Female│ +│ ├─────┼──────┤ +│ │Count│ Count│ +├────────────────────────────────────────────────────────────────┼─────┼──────┤ +│D5a. What would you say is your primary Cuban │ 13│ 7│ +│ethnic background? Mexican │ 175│ 136│ +│ Spanish │ 20│ 28│ +│ South American │ 21│ 13│ +│ Central American │ 27│ 25│ +│ Puerto Rican, OR │ 37│ 41│ +│ Something else │ 35│ 33│ +│ Multiple - cannot │ 2│ 5│ +│ choose one │ │ │ +╰────────────────────────────────────────────────────────────────┴─────┴──────╯ + + Custom Tables +╭────────────────────────────────────────────────────────────┬────────────────╮ +│ │ QNS3A S3a. │ +│ │ GENDER: │ +│ ├───────┬────────┤ +│ │ Male │ Female │ +│ ├───────┼────────┤ +│ │ Count │ Count │ +├────────────────────────────────────────────────────────────┼───────┼────────┤ +│QND5A D5a. What would you say is your Cuban │ 13│ 7│ +│primary ethnic background? Mexican │ 175│ 136│ +│ Spanish │ 20│ 28│ +│ South American │ 21│ 13│ +│ Central American │ 27│ 25│ +│ Puerto Rican, OR │ 37│ 41│ +│ Something else │ 35│ 33│ +│ Multiple - cannot │ 2│ 5│ +│ choose one │ │ │ +╰────────────────────────────────────────────────────────────┴───────┴────────╯ + + Custom Tables +╭────────────────────────────┬─────┬──────╮ +│ │ Male│Female│ +│ ├─────┼──────┤ +│ │Count│ Count│ +├────────────────────────────┼─────┼──────┤ +│Cuban │ 13│ 7│ +│Mexican │ 175│ 136│ +│Spanish │ 20│ 28│ +│South American │ 21│ 13│ +│Central American │ 27│ 25│ +│Puerto Rican, OR │ 37│ 41│ +│Something else │ 35│ 33│ +│Multiple - cannot choose one│ 2│ 5│ +╰────────────────────────────┴─────┴──────╯ +]) +AT_CLEANUP + -- 2.30.2