╰────────────────────────────────────────────────────────────────────────┴─────╯
])
AT_CLEANUP
+
+
+AT_SETUP([CTABLES simple totals])
+AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_DATA([ctables.sps],
+[[GET 'nhtsa.sav'.
+CTABLES /TABLE=qn17
+ /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
+CTABLES /TABLE=region > qn18 [MEAN, COUNT]
+ /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
+]])
+AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
+ Custom Tables
+╭────────────────────────────────────────────────────────────────────────┬─────╮
+│ │Count│
+├────────────────────────────────────────────────────────────────────────┼─────┤
+│17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
+│the following beverages do you drink MOST OFTEN? Beer │ 1073│
+│ Light beer │ 620│
+│ Wine │ 1418│
+│ Wine coolers │ 137│
+│ Hard liquor or │ 888│
+│ mixed drinks │ │
+│ Flavored malt │ 83│
+│ drinks │ │
+│ Number responding │ 4221│
+╰────────────────────────────────────────────────────────────────────────┴─────╯
+
+ Custom Tables
+╭───────────────────────────────────────────────────────────────────┬────┬─────╮
+│ │Mean│Count│
+├───────────────────────────────────────────────────────────────────┼────┼─────┤
+│Region NE 18. When you drink ANSWERFROM(QN17R1), about how │4.36│ 949│
+│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
+│ sitting? │ │ │
+│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
+│ MW 18. When you drink ANSWERFROM(QN17R1), about how │4.67│ 1027│
+│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
+│ sitting? │ │ │
+│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
+│ S 18. When you drink ANSWERFROM(QN17R1), about how │4.71│ 1287│
+│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
+│ sitting? │ │ │
+│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
+│ W 18. When you drink ANSWERFROM(QN17R1), about how │4.69│ 955│
+│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
+│ sitting? │ │ │
+│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
+│ All 18. When you drink ANSWERFROM(QN17R1), about how │4.62│ 4218│
+│ regions many ANSWERFROM(QN17R2) do you usually drink per │ │ │
+│ sitting? │ │ │
+╰───────────────────────────────────────────────────────────────────┴────┴─────╯
+])
+AT_CLEANUP