AT_BANNER([CTABLES])
-dnl Features not yet implemented:
-dnl
-dnl - Preprocessing to distinguish categorical from scale.
-dnl
dnl Features not yet tested:
+dnl - Preprocessing to distinguish categorical from scale.
dnl - Parsing (positive and negative)
dnl - String variables and values
dnl - Testing details of missing value handling in summaries.
-# AT_SETUP([CTABLES parsing])
-# AT_DATA([ctables.sps],
-# [[DATA LIST LIST NOTABLE /x y z.
-# CTABLES /TABLE=(x + y) > z.
-# CTABLES /TABLE=(x[c] + y[c]) > z.
-# CTABLES /TABLE=(x + y) > z[c].
-# CTABLES /TABLE=x BY y BY z.
-# CTABLES /TABLE=x[c] [ROWPCT.COUNT] > y[c].
-# CTABLES /TABLE=x[c] > y[c] [ROWPCT.COUNT].
-# ]])
-# AT_CHECK([pspp ctables.sps])
-# AT_CLEANUP
+AT_SETUP([CTABLES parsing])
+AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_DATA([ctables.sps],
+[[GET 'nhtsa.sav'.
+CTABLES
+ /FORMAT MINCOLWIDTH=10 MAXCOLWIDTH=20 UNITS=POINTS EMPTY=ZERO MISSING="x"
+ /FORMAT MINCOLWIDTH=DEFAULT MAXCOLWIDTH=DEFAULT UNITS=INCHES EMPTY=BLANK MISSING="."
+ /FORMAT UNITS=CM EMPTY="(-)"
+ /VLABELS VARIABLES=qn1 DISPLAY=DEFAULT
+ /VLABELS VARIABLES=qn17 DISPLAY=NAME
+ /VLABELS VARIABLES=qns3a DISPLAY=LABEL
+ /VLABELS VARIABLES=qnd1 DISPLAY=BOTH
+ /VLABELS VARIABLES=qn20 DISPLAY=NONE
+ /MRSETS COUNTDUPLICATES=NO
+ /MRSETS COUNTDUPLICATES=YES
+ /SMISSING VARIABLE
+ /SMISSING LISTWISE
+ /WEIGHT VARIABLE=qns3a
+ /HIDESMALLCOUNTS
+ /HIDESMALLCOUNTS COUNT=10
+ /TABLE qnd1
+ /SLABELS POSITION=COLUMN VISIBLE=YES
+ /SLABELS VISIBLE=NO POSITION=ROW
+ /SLABELS POSITION=LAYER
+ /CLABELS AUTO
+ /CLABELS ROWLABELS=OPPOSITE
+ /CLABELS ROWLABELS=LAYER
+ /CLABELS COLLABELS=OPPOSITE
+ /CLABELS COLLABELS=LAYER
+ /CRITERIA CILEVEL=50
+ /CATEGORIES VARIABLES=qn1 qn17
+ ORDER=A KEY=VALUE MISSING=INCLUDE TOTAL=YES LABEL="xyzzy"
+ POSITION=BEFORE EMPTY=INCLUDE.
+]])
+AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
+ Custom Tables
+Mean
+╭───────────────────────────────┬──╮
+│qnd1 D1. AGE: What is your age?│49│
+╰───────────────────────────────┴──╯
+])
+AT_CLEANUP
AT_SETUP([CTABLES one categorical variable])
AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])