1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
29 m4_define([WEAVE_6X6],
74 m4_define([WEAVE_8X8],
128 # This input is something of a counterexample, in that it could render
129 # compactly as this if the algorithm for choosing cell widths and
130 # heights were smarter:
149 m4_define([WEAVE_8X8_2],
169 2*3 @MNOPQ\nRSTUV\nWXYZ0
174 AT_BANNER([output rendering -- no page breaking])
176 AT_SETUP([single cell])
177 AT_KEYWORDS([render rendering])
178 AT_DATA([input], [1 1
181 AT_CHECK([render-test input], [0], [abc
185 AT_SETUP([single cell with border])
186 AT_KEYWORDS([render rendering])
187 AT_DATA([input], [1 1
190 AT_CHECK([render-test input], [0], [dnl
197 AT_SETUP([joined columns])
198 AT_KEYWORDS([render rendering])
199 AT_DATA([input], [2 2
204 AT_CHECK([render-test input], [0], [dnl
213 AT_SETUP([3x3, joined rows and columns])
214 AT_KEYWORDS([render rendering])
215 AT_DATA([input], [3 3
222 AT_CHECK([render-test input], [0], [dnl
233 AT_SETUP([joined rows and columns (with footnotes)])
234 AT_KEYWORDS([render rendering footnote])
235 AT_DATA([input], [3 3
236 1*2 @abc#Approximation.
237 2*1 @d\ne\nf#This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably.
238 2*1 @g\nh\ni#One#Two#Three
242 AT_CHECK([render-test --csv input], [0],
243 [[+------------+----+
251 b. This is a very long footnote that will have to wrap from one line to the
252 next. Let's see if the rendering engine does it acceptably.
257 AT_CHECK([cat render.csv], [0],
268 b,This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably.
275 AT_SETUP([6x6, joined rows and columns])
276 AT_KEYWORDS([render rendering])
277 AT_DATA([input], [WEAVE_6X6])
278 AT_CHECK([render-test input], [0], [dnl
295 AT_SETUP([3 rows with many joined cells])
296 AT_KEYWORDS([render rendering])
297 AT_CAPTURE_FILE([input])
298 AT_DATA([input], [3 19
299 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
301 m4_for([x], [2], [19], [1], [1*2 @x
304 AT_CHECK([render-test input], [0], [dnl
305 a b c d e f g h i j k l m n o p q r s
306 +-+---+---+---+---+---+---+---+---+----+
307 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10|
308 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
309 | 11| 12| 13| 14| 15| 16| 17| 18| 19|20|
310 +---+---+---+---+---+---+---+---+---+--+
314 AT_SETUP([3 columns with many joined cells])
315 AT_KEYWORDS([render rendering])
316 AT_CAPTURE_FILE([input])
317 AT_DATA([input], [19 3
358 AT_CHECK([render-test input], [0], [dnl
401 AT_SETUP([joined rows])
402 AT_KEYWORDS([render rendering])
403 AT_DATA([input], [2 2
408 AT_CHECK([render-test input], [0], [dnl
417 dnl This checks for bug #31346, a segmentation fault that surfaced
418 dnl when two or more rows had no unspanned cells and no rules.
419 AT_SETUP([joined rows only, no rules])
420 AT_KEYWORDS([render rendering])
421 AT_DATA([input], [2 2
425 AT_CHECK([render-test input], [0], [dnl
432 AT_SETUP([joined columns only, no rules])
433 AT_KEYWORDS([render rendering])
434 AT_DATA([input], [2 2
438 AT_CHECK([render-test input], [0], [dnl
447 AT_SETUP([5 big narrow cells])
448 AT_KEYWORDS([render rendering])
449 AT_DATA([input], [1 5
450 @This cell has a lot of text but its minimum width is pretty narrow.
451 @This cell also has a lot of text but its minimum width is pretty narrow.
452 @A third cell with a lot of text but a pretty narrow minimum width.
453 @A fourth cell with a lot of text but a pretty narrow minimum width.
454 @A fifth cell with a lot of text but a pretty narrow minimum width.
456 AT_CHECK([render-test input], [0], [dnl
457 +---------------+---------------+--------------+---------------+--------------+
458 |This cell has a| This cell also| A third cell| A fourth cell| A fifth cell|
459 |lot of text but| has a lot of| with a lot of| with a lot of| with a lot of|
460 | its minimum| text but its| text but a| text but a| text but a|
461 |width is pretty| minimum width| pretty narrow| pretty narrow| pretty narrow|
462 | narrow.| is pretty|minimum width.| minimum width.|minimum width.|
464 +---------------+---------------+--------------+---------------+--------------+
468 AT_SETUP([9 big narrow cells])
469 AT_KEYWORDS([render rendering])
470 AT_DATA([input], [1 9
471 @This cell has a lot of text but its minimum width is pretty narrow.
472 @This cell also has a lot of text but its minimum width is pretty narrow.
473 @A third cell with a lot of text but a pretty narrow minimum width.
474 @A fourth cell with a lot of text but a pretty narrow minimum width.
475 @A fifth cell with a lot of text but a pretty narrow minimum width.
476 @A sixth cell with a lot of text but a pretty narrow minimum width.
477 @A seventh cell with a lot of text but a pretty narrow minimum width.
478 @A eighth cell with a lot of text but a pretty narrow minimum width.
479 @A ninth cell with a lot of text but a pretty narrow minimum width.
481 AT_CHECK([render-test input], [0], [dnl
482 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
483 | This| This| A third|A fourth|A fifth| A sixth| A| A| A ninth|
484 |cell has| cell| cell| cell| cell| cell| seventh| eighth| cell|
485 |a lot of| also| with a| with a| with a| with a| cell| cell| with a|
486 |text but| has a| lot of| lot of| lot of| lot of| with a| with a| lot of|
487 | its| lot of|text but|text but| text|text but| lot of| lot of|text but|
488 | minimum| text|a pretty|a pretty| but a|a pretty|text but| text|a pretty|
489 |width is|but its| narrow| narrow| pretty| narrow|a pretty| but a| narrow|
490 | pretty|minimum| minimum| minimum| narrow| minimum| narrow| pretty| minimum|
491 | narrow.| width| width.| width.|minimum| width.| minimum| narrow| width.|
492 | | is| | | width.| | width.|minimum| |
493 | | pretty| | | | | | width.| |
494 | |narrow.| | | | | | | |
495 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
499 AT_SETUP([2 big cells with new-lines])
500 AT_KEYWORDS([render rendering])
501 AT_DATA([input], [1 2
502 @PSPP does not place many restrictions on ordering of commands. The main restriction is that variables must be defined before they are otherwise referenced. This section describes the details of command ordering, but most users will have no need to refer to them. PSPP possesses five internal states, called initial, INPUT PROGRAM, FILE TYPE, transformation, and procedure states.
503 @PSPP includes special support\nfor unknown numeric data values.\nMissing observations are assigned\na special value, called the\n``system‑missing value''. This\n``value'' actually indicates the\nabsence of a value; it\nmeans that the actual\nvalue is unknown.
505 AT_CHECK([render-test input], [0], [dnl
506 +----------------------------------------------------------+------------------+
507 | PSPP does not place many restrictions on ordering of| PSPP includes|
508 | commands. The main restriction is that variables must be| special support|
509 | defined before they are otherwise referenced. This| for unknown|
510 | section describes the details of command ordering, but| numeric data|
511 | most users will have no need to refer to them. PSPP| values.|
512 | possesses five internal states, called initial, INPUT| Missing|
513 | PROGRAM, FILE TYPE, transformation, and procedure states.| observations are|
515 | | a special value,|
517 | | ``system‑missing|
519 | |``value'' actually|
525 | | value is unknown.|
526 +----------------------------------------------------------+------------------+
530 AT_SETUP([8x8 with many 2x2 joins])
531 AT_KEYWORDS([render rendering])
532 AT_DATA([input], [WEAVE_8X8_2])
533 AT_CHECK([render-test input], [0],[dnl
560 AT_SETUP([ASCII driver Unicode box characters])
561 AT_KEYWORDS([render rendering])
562 AT_DATA([input], [3 3
569 AT_CHECK([render-test --box=unicode input], [0], [dnl
570 â•â”€â”€â”€â”¬â”€â•®
576 ╰─┴───╯
580 AT_BANNER([output rendering -- horizontal page breaks])
582 AT_SETUP([breaking row of many small cells])
583 AT_KEYWORDS([render rendering])
584 AT_CAPTURE_FILE([input])
585 AT_DATA([input], [1 50
586 m4_for([x], [1], [50], [1], [@x
588 AT_CHECK([render-test input], [0], [dnl
589 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
590 |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|
591 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
593 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
594 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
595 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
597 AT_CHECK([render-test input -o mb0 --min-break=0], [0], [dnl
598 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
599 |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|
600 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
602 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
603 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
604 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
608 AT_SETUP([breaking row of many small cells, with headers])
609 AT_KEYWORDS([render rendering])
610 AT_CAPTURE_FILE([input])
611 AT_DATA([input], [1 54 2 2
614 m4_for([x], [1], [50], [1], [@x
619 AT_CHECK([render-test input], [0], [dnl
620 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
621 |ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd|
622 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
624 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
625 |ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd|
626 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
628 +--+--+--+--+--+--+--+
629 |ha|hb|48|49|50|hc|hd|
630 +--+--+--+--+--+--+--+
632 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
633 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
634 |ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd|
635 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
637 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
638 |ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd|
639 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
641 +--+--+--+--+--+--+--+
642 |ha|hb|48|49|50|hc|hd|
643 +--+--+--+--+--+--+--+
647 AT_SETUP([breaking row of many medium-size cells])
648 AT_KEYWORDS([render rendering])
649 AT_CAPTURE_FILE([input])
650 AT_DATA([input], [1 50
651 m4_for([x], [1], [50], [1], [@cell x
653 AT_CHECK([render-test input], [0], [dnl
654 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
655 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
656 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15|
657 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
659 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
660 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
661 | 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30|
662 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
664 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
665 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
666 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45|
667 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
669 +----+----+----+----+----+
670 |cell|cell|cell|cell|cell|
671 | 46| 47| 48| 49| 50|
672 +----+----+----+----+----+
674 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
675 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
676 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cel
677 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 1
678 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
680 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
681 l|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce
682 6| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31|
683 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
685 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
686 ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|c
687 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47|
688 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
697 AT_SETUP([breaking row of many medium-size cells, with headers])
698 AT_KEYWORDS([render rendering])
699 AT_CAPTURE_FILE([input])
700 AT_DATA([input], [1 52 1 1
702 m4_for([x], [1], [50], [1], [@cell x
706 AT_CHECK([render-test input], [0], [dnl
707 +----+----+----+----+----+----+----+----+----+----+----+----+
708 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
709 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12|
710 +----+----+----+----+----+----+----+----+----+----+----+----+
712 +----+----+----+----+----+----+----+----+----+----+----+----+
713 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
714 | 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24|
715 +----+----+----+----+----+----+----+----+----+----+----+----+
717 +----+----+----+----+----+----+----+----+----+----+----+----+
718 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
719 | 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36|
720 +----+----+----+----+----+----+----+----+----+----+----+----+
722 +----+----+----+----+----+----+----+----+----+----+----+----+
723 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
724 | 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48|
725 +----+----+----+----+----+----+----+----+----+----+----+----+
728 header1|cell|cell|header2
732 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
733 +----+----+----+----+----+----+----+----+----+----+----+----+--+
734 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
735 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| |
736 +----+----+----+----+----+----+----+----+----+----+----+----+--+
738 +--+----+----+----+----+----+----+----+----+----+----+----+----+
739 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
740 |13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25|
741 +--+----+----+----+----+----+----+----+----+----+----+----+----+
743 +----+----+----+----+----+----+----+----+----+----+----+----+--+
744 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
745 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| |
746 +----+----+----+----+----+----+----+----+----+----+----+----+--+
748 +--+----+----+----+----+----+----+----+----+----+----+----+----+
749 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
750 |38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50|
751 +--+----+----+----+----+----+----+----+----+----+----+----+----+
755 AT_SETUP([breaking row of many big narrow cells])
756 AT_KEYWORDS([render rendering])
757 AT_CAPTURE_FILE([input])
758 AT_DATA([input], [1 50
759 m4_for([x], [1], [50], [1], [@This is cell x in a series of 50.
761 AT_CHECK([render-test input], [0], [dnl
762 +------+------+------+------+------+------+------+------+------+------+------+
763 | This| This| This| This| This| This| This| This| This| This| This|
764 | is| is| is| is| is| is| is| is| is| is| is|
765 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell|
766 | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in|
767 |series|series|series|series|series|series|series|series|series| a| a|
768 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|
769 | | | | | | | | | |of 50.|of 50.|
770 +------+------+------+------+------+------+------+------+------+------+------+
772 +------+------+------+------+------+------+------+------+------+------+------+
773 | This| This| This| This| This| This| This| This| This| This| This|
774 | is| is| is| is| is| is| is| is| is| is| is|
775 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
776 | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in|
777 | a| a| a| a| a| a| a| a| a| a| a|
778 |series|series|series|series|series|series|series|series|series|series|series|
779 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
780 +------+------+------+------+------+------+------+------+------+------+------+
782 +------+------+------+------+------+------+------+------+------+------+------+
783 | This| This| This| This| This| This| This| This| This| This| This|
784 | is| is| is| is| is| is| is| is| is| is| is|
785 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
786 | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in|
787 | a| a| a| a| a| a| a| a| a| a| a|
788 |series|series|series|series|series|series|series|series|series|series|series|
789 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
790 +------+------+------+------+------+------+------+------+------+------+------+
792 +------+------+------+------+------+------+------+------+------+------+------+
793 | This| This| This| This| This| This| This| This| This| This| This|
794 | is| is| is| is| is| is| is| is| is| is| is|
795 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
796 | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in|
797 | a| a| a| a| a| a| a| a| a| a| a|
798 |series|series|series|series|series|series|series|series|series|series|series|
799 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
800 +------+------+------+------+------+------+------+------+------+------+------+
802 +------+------+------+------+------+------+
803 | This| This| This| This| This| This|
804 | is| is| is| is| is| is|
805 | cell| cell| cell| cell| cell| cell|
806 | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in|
808 |series|series|series|series|series|series|
809 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
810 +------+------+------+------+------+------+
812 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
813 +------+------+------+------+------+------+------+------+------+------+------+-
814 | This| This| This| This| This| This| This| This| This| This| This|
815 | is| is| is| is| is| is| is| is| is| is| is|
816 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell|
817 | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in|
818 |series|series|series|series|series|series|series|series|series| a| a|
819 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|s
820 | | | | | | | | | |of 50.|of 50.|o
821 +------+------+------+------+------+------+------+------+------+------+------+-
823 -----+------+------+------+------+------+------+------+------+------+------+---
824 This| This| This| This| This| This| This| This| This| This| This| T
825 is| is| is| is| is| is| is| is| is| is| is|
826 cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| c
827 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| 23
828 a| a| a| a| a| a| a| a| a| a| a|
829 eries|series|series|series|series|series|series|series|series|series|series|ser
830 f 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of
831 -----+------+------+------+------+------+------+------+------+------+------+---
833 ---+------+------+------+------+------+------+------+------+------+------+-----
834 his| This| This| This| This| This| This| This| This| This| This| Thi
835 is| is| is| is| is| is| is| is| is| is| is| i
836 ell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cel
837 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| 34 i
838 a| a| a| a| a| a| a| a| a| a| a|
839 ies|series|series|series|series|series|series|series|series|series|series|serie
840 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50
841 ---+------+------+------+------+------+------+------+------+------+------+-----
843 -+------+------+------+------+------+------+------+------+------+------+------+
844 s| This| This| This| This| This| This| This| This| This| This| This|
845 s| is| is| is| is| is| is| is| is| is| is| is|
846 l| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
847 n| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| 45 in|
848 a| a| a| a| a| a| a| a| a| a| a| a|
849 s|series|series|series|series|series|series|series|series|series|series|series|
850 .|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
851 -+------+------+------+------+------+------+------+------+------+------+------+
853 +------+------+------+------+------+
854 | This| This| This| This| This|
855 | is| is| is| is| is|
856 | cell| cell| cell| cell| cell|
857 | 46 in| 47 in| 48 in| 49 in| 50 in|
859 |series|series|series|series|series|
860 |of 50.|of 50.|of 50.|of 50.|of 50.|
861 +------+------+------+------+------+
865 AT_SETUP([breaking 2 rows of many small cells])
866 AT_KEYWORDS([render rendering])
867 AT_CAPTURE_FILE([input])
868 AT_DATA([input], [2 50
869 m4_for([x], [1], [100], [1], [@x
871 AT_CHECK([render-test input], [0], [dnl
872 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
873 | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|
874 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
875 |51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|
876 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
878 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
879 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
880 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
881 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
882 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
884 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
885 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
886 | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|
887 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
888 |51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|
889 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
891 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
892 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
893 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
894 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
895 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
899 AT_SETUP([breaking 3 rows with many joined cells])
900 AT_KEYWORDS([render rendering])
901 AT_CAPTURE_FILE([input])
902 AT_DATA([input], [3 49
903 m4_foreach([var], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,dnl
904 A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var
906 m4_for([x], [2], [49], [1], [1*2 @x
909 AT_CHECK([render-test input], [0], [dnl
910 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M
911 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
912 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
913 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
914 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
915 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
918 +---+---+---+---+----+
919 | 21| 22| 23| 24| 25|
920 +-+-+-+-+-+-+-+-+-+--+
921 45| 46| 47| 48| 49|50|
922 --+---+---+---+---+--+
924 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
925 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M
926 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
927 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
928 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
929 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
930 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
933 +---+---+---+---+----+
934 | 21| 22| 23| 24| 25|
935 +-+-+-+-+-+-+-+-+-+--+
936 45| 46| 47| 48| 49|50|
937 --+---+---+---+---+--+
941 AT_SETUP([horz break 6x6, joined rows and columns])
942 AT_KEYWORDS([render rendering])
943 AT_DATA([input], [WEAVE_6X6])
944 AT_DATA([expout], [dnl
987 AT_CHECK([render-test --width=6 input], [0], [expout])
988 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
991 AT_SETUP([horz break 6x6, joined rows and columns, left header])
992 AT_KEYWORDS([render rendering])
993 AT_DATA([input], [WEAVE_6X6([1 0 0 0])])
994 AT_DATA([expout], [dnl
1023 AT_CHECK([render-test --width=10 input], [0], [expout])
1024 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1027 AT_SETUP([horz break 6x6, joined rows and columns, right header])
1028 AT_KEYWORDS([render rendering])
1029 AT_DATA([input], [WEAVE_6X6([0 1 0 0])])
1030 AT_DATA([expout], [dnl
1059 AT_CHECK([render-test --width=10 input], [0], [expout])
1060 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1063 AT_SETUP([breaking joined cells too wide for page])
1064 AT_KEYWORDS([render rendering])
1065 AT_DATA([input], [4 6
1066 1*6 @abc def ghi jkl
1079 AT_CHECK([render-test --width=10 input], [0], [dnl
1104 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [dnl
1131 AT_SETUP([breaking joined cells much too wide for page])
1132 AT_KEYWORDS([render rendering])
1133 AT_DATA([input], [4 6
1134 1*6 @abc def ghi jkl
1147 AT_CHECK([render-test --width=6 input], [0], [dnl
1184 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1223 AT_SETUP([breaking cell too wide for page, no border])
1224 AT_KEYWORDS([render rendering])
1225 AT_CAPTURE_FILE([input])
1226 AT_DATA([input], [1 1
1227 abcdefghijklmnopqrstuvwxyz
1229 AT_CHECK([render-test --width=6 input], [0], [dnl
1240 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1253 AT_SETUP([breaking cell too wide for page, with border])
1254 AT_KEYWORDS([render rendering])
1255 AT_CAPTURE_FILE([input])
1256 AT_DATA([input], [1 1
1257 @abcdefghijklmnopqrstuvwxyz
1259 AT_DATA([expout], [dnl
1280 AT_CHECK([render-test --width=6 input], [0], [expout])
1281 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
1284 AT_SETUP([horz break 8x8 with many 2x2 joins])
1285 AT_KEYWORDS([render rendering])
1286 AT_DATA([input], [WEAVE_8X8_2])
1287 AT_CHECK([render-test --width=8 input], [0],[dnl
1357 AT_CHECK([render-test -o mb0 --min-break=0 --width=8 input], [0],[dnl
1429 AT_BANNER([output rendering -- problematic procedures])
1431 dnl LIST used to put columns right up next to each other without any
1432 dnl intervening space, so this checks for regression.
1433 AT_SETUP([LIST puts space between columns])
1434 AT_KEYWORDS([render rendering])
1435 AT_DATA([list.sps], [dnl
1436 DATA LIST LIST NOTABLE /x y z (F1.0).
1444 AT_CHECK([pspp list.sps], [0], [dnl
1456 # Long string variables tend to end in lots of spaces. The ASCII
1457 # driver didn't handle this very well: it would essentially produce
1458 # one blank line in a cell for each trailing space. This test
1459 # checks for regression. See bug #38672.
1460 AT_SETUP([ASCII driver renders end of line spaces reasonably])
1461 AT_KEYWORDS([render rendering])
1462 AT_DATA([input], [dnl
1474 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
1485 # There was a bug that, when multiple cells spanned a single column
1486 # (or row), only the dimensions of the cell nearest the bottom of the
1487 # table were actually considered. This checks for regression. (This
1488 # problem was most easily observed with SYSFILE INFO, which uses lots
1489 # of spanned cells).
1491 # Without the fix, the output looks like this:
1498 AT_SETUP([multiple spanned cells all contribute to dimensions])
1499 AT_KEYWORDS([render rendering])
1500 AT_DATA([input], [dnl
1502 1*2 @A long text string.
1505 AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl
1506 +--------------------+
1507 | A long text string.|
1508 +--------------------+
1510 +--------------------+