MINCOLWIDTH
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 4 Aug 2022 23:58:59 +0000 (16:58 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 4 Aug 2022 23:58:59 +0000 (16:58 -0700)
tests/language/stats/ctables.at

index 0b85e617e8b04ca7a2fa0ba1e13cb24df222b6aa..9c9e598c435b06358bed5515698c352328f56ea0 100644 (file)
@@ -2374,3 +2374,28 @@ AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
 ])
 AT_CLEANUP
+
+AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
+AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_DATA([ctables.sps],
+[[GET 'nhtsa.sav'.
+CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
+]])
+AT_CHECK([pspp ctables.sps -o - -O box=unicode -o pspp.spv], [0], [dnl
+ Custom Tables
+╭────────────╮
+│S3a. GENDER:│
+├─────┬──────┤
+│ Male│Female│
+├─────┼──────┤
+│Count│ Count│
+├─────┼──────┤
+│ 3132│  3867│
+╰─────┴──────╯
+])
+AT_CHECK([pspp-output get-table-look pspp.spv pspp.stt])
+AT_CHECK([sed 's/ /\n/g' pspp.stt | grep ColumnWidth | sort], [0], [dnl
+maximumColumnWidth="192"
+minimumColumnWidth="96"
+])
+AT_CLEANUP