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],
265 Footnote: a. Approximation.
266 Footnote: 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.
273 AT_SETUP([6x6, joined rows and columns])
274 AT_KEYWORDS([render rendering])
275 AT_DATA([input], [WEAVE_6X6])
276 AT_CHECK([render-test input], [0], [dnl
293 AT_SETUP([3 rows with many joined cells])
294 AT_KEYWORDS([render rendering])
295 AT_CAPTURE_FILE([input])
296 AT_DATA([input], [3 19
297 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
299 m4_for([x], [2], [19], [1], [1*2 @x
302 AT_CHECK([render-test input], [0], [dnl
303 a b c d e f g h i j k l m n o p q r s
304 +-+---+---+---+---+---+---+---+---+----+
305 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10|
306 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
307 | 11| 12| 13| 14| 15| 16| 17| 18| 19|20|
308 +---+---+---+---+---+---+---+---+---+--+
312 AT_SETUP([3 columns with many joined cells])
313 AT_KEYWORDS([render rendering])
314 AT_CAPTURE_FILE([input])
315 AT_DATA([input], [19 3
356 AT_CHECK([render-test input], [0], [dnl
399 AT_SETUP([joined rows])
400 AT_KEYWORDS([render rendering])
401 AT_DATA([input], [2 2
406 AT_CHECK([render-test input], [0], [dnl
415 dnl This checks for bug #31346, a segmentation fault that surfaced
416 dnl when two or more rows had no unspanned cells and no rules.
417 AT_SETUP([joined rows only, no rules])
418 AT_KEYWORDS([render rendering])
419 AT_DATA([input], [2 2
423 AT_CHECK([render-test input], [0], [dnl
430 AT_SETUP([joined columns only, no rules])
431 AT_KEYWORDS([render rendering])
432 AT_DATA([input], [2 2
436 AT_CHECK([render-test input], [0], [dnl
445 AT_SETUP([5 big narrow cells])
446 AT_KEYWORDS([render rendering])
447 AT_DATA([input], [1 5
448 @This cell has a lot of text but its minimum width is pretty narrow.
449 @This cell also has a lot of text but its minimum width is pretty narrow.
450 @A third cell with a lot of text but a pretty narrow minimum width.
451 @A fourth cell with a lot of text but a pretty narrow minimum width.
452 @A fifth cell with a lot of text but a pretty narrow minimum width.
454 AT_CHECK([render-test input], [0], [dnl
455 +---------------+---------------+--------------+---------------+--------------+
456 |This cell has a| This cell also| A third cell| A fourth cell| A fifth cell|
457 |lot of text but| has a lot of| with a lot of| with a lot of| with a lot of|
458 | its minimum| text but its| text but a| text but a| text but a|
459 |width is pretty| minimum width| pretty narrow| pretty narrow| pretty narrow|
460 | narrow.| is pretty|minimum width.| minimum width.|minimum width.|
462 +---------------+---------------+--------------+---------------+--------------+
466 AT_SETUP([9 big narrow cells])
467 AT_KEYWORDS([render rendering])
468 AT_DATA([input], [1 9
469 @This cell has a lot of text but its minimum width is pretty narrow.
470 @This cell also has a lot of text but its minimum width is pretty narrow.
471 @A third cell with a lot of text but a pretty narrow minimum width.
472 @A fourth cell with a lot of text but a pretty narrow minimum width.
473 @A fifth cell with a lot of text but a pretty narrow minimum width.
474 @A sixth cell with a lot of text but a pretty narrow minimum width.
475 @A seventh cell with a lot of text but a pretty narrow minimum width.
476 @A eighth cell with a lot of text but a pretty narrow minimum width.
477 @A ninth cell with a lot of text but a pretty narrow minimum width.
479 AT_CHECK([render-test input], [0], [dnl
480 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
481 | This| This| A third|A fourth|A fifth| A sixth| A| A| A ninth|
482 |cell has| cell| cell| cell| cell| cell| seventh| eighth| cell|
483 |a lot of| also| with a| with a| with a| with a| cell| cell| with a|
484 |text but| has a| lot of| lot of| lot of| lot of| with a| with a| lot of|
485 | its| lot of|text but|text but| text|text but| lot of| lot of|text but|
486 | minimum| text|a pretty|a pretty| but a|a pretty|text but| text|a pretty|
487 |width is|but its| narrow| narrow| pretty| narrow|a pretty| but a| narrow|
488 | pretty|minimum| minimum| minimum| narrow| minimum| narrow| pretty| minimum|
489 | narrow.| width| width.| width.|minimum| width.| minimum| narrow| width.|
490 | | is| | | width.| | width.|minimum| |
491 | | pretty| | | | | | width.| |
492 | |narrow.| | | | | | | |
493 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
497 AT_SETUP([2 big cells with new-lines])
498 AT_KEYWORDS([render rendering])
499 AT_DATA([input], [1 2
500 @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.
501 @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.
503 AT_CHECK([render-test input], [0], [dnl
504 +----------------------------------------------------------+------------------+
505 | PSPP does not place many restrictions on ordering of| PSPP includes|
506 | commands. The main restriction is that variables must be| special support|
507 | defined before they are otherwise referenced. This| for unknown|
508 | section describes the details of command ordering, but| numeric data|
509 | most users will have no need to refer to them. PSPP| values.|
510 | possesses five internal states, called initial, INPUT| Missing|
511 | PROGRAM, FILE TYPE, transformation, and procedure states.| observations are|
513 | | a special value,|
515 | | ``system‑missing|
517 | |``value'' actually|
523 | | value is unknown.|
524 +----------------------------------------------------------+------------------+
528 AT_SETUP([8x8 with many 2x2 joins])
529 AT_KEYWORDS([render rendering])
530 AT_DATA([input], [WEAVE_8X8_2])
531 AT_CHECK([render-test input], [0],[dnl
557 AT_BANNER([output rendering -- horizontal page breaks])
559 AT_SETUP([breaking row of many small cells])
560 AT_KEYWORDS([render rendering])
561 AT_CAPTURE_FILE([input])
562 AT_DATA([input], [1 50
563 m4_for([x], [1], [50], [1], [@x
565 AT_CHECK([render-test input], [0], [dnl
566 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
567 |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|
568 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
570 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
571 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
572 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
574 AT_CHECK([render-test input -o mb0 --min-break=0], [0], [dnl
575 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
576 |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|
577 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
579 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
580 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
581 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
585 AT_SETUP([breaking row of many small cells, with headers])
586 AT_KEYWORDS([render rendering])
587 AT_CAPTURE_FILE([input])
588 AT_DATA([input], [1 54 2 2
591 m4_for([x], [1], [50], [1], [@x
596 AT_CHECK([render-test input], [0], [dnl
597 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
598 |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|
599 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
601 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
602 |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|
603 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
605 +--+--+--+--+--+--+--+
606 |ha|hb|48|49|50|hc|hd|
607 +--+--+--+--+--+--+--+
609 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
610 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
611 |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|
612 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
614 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
615 |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|
616 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
618 +--+--+--+--+--+--+--+
619 |ha|hb|48|49|50|hc|hd|
620 +--+--+--+--+--+--+--+
624 AT_SETUP([breaking row of many medium-size cells])
625 AT_KEYWORDS([render rendering])
626 AT_CAPTURE_FILE([input])
627 AT_DATA([input], [1 50
628 m4_for([x], [1], [50], [1], [@cell x
630 AT_CHECK([render-test input], [0], [dnl
631 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
632 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
633 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15|
634 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
636 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
637 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
638 | 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30|
639 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
641 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
642 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
643 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45|
644 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
646 +----+----+----+----+----+
647 |cell|cell|cell|cell|cell|
648 | 46| 47| 48| 49| 50|
649 +----+----+----+----+----+
651 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
652 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
653 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cel
654 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 1
655 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
657 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
658 l|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce
659 6| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31|
660 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
662 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
663 ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|c
664 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47|
665 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
674 AT_SETUP([breaking row of many medium-size cells, with headers])
675 AT_KEYWORDS([render rendering])
676 AT_CAPTURE_FILE([input])
677 AT_DATA([input], [1 52 1 1
679 m4_for([x], [1], [50], [1], [@cell x
683 AT_CHECK([render-test input], [0], [dnl
684 +----+----+----+----+----+----+----+----+----+----+----+----+
685 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
686 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12|
687 +----+----+----+----+----+----+----+----+----+----+----+----+
689 +----+----+----+----+----+----+----+----+----+----+----+----+
690 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
691 | 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24|
692 +----+----+----+----+----+----+----+----+----+----+----+----+
694 +----+----+----+----+----+----+----+----+----+----+----+----+
695 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
696 | 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36|
697 +----+----+----+----+----+----+----+----+----+----+----+----+
699 +----+----+----+----+----+----+----+----+----+----+----+----+
700 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
701 | 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48|
702 +----+----+----+----+----+----+----+----+----+----+----+----+
705 header1|cell|cell|header2
709 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
710 +----+----+----+----+----+----+----+----+----+----+----+----+--+
711 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
712 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| |
713 +----+----+----+----+----+----+----+----+----+----+----+----+--+
715 +--+----+----+----+----+----+----+----+----+----+----+----+----+
716 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
717 |13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25|
718 +--+----+----+----+----+----+----+----+----+----+----+----+----+
720 +----+----+----+----+----+----+----+----+----+----+----+----+--+
721 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
722 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| |
723 +----+----+----+----+----+----+----+----+----+----+----+----+--+
725 +--+----+----+----+----+----+----+----+----+----+----+----+----+
726 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
727 |38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50|
728 +--+----+----+----+----+----+----+----+----+----+----+----+----+
732 AT_SETUP([breaking row of many big narrow cells])
733 AT_KEYWORDS([render rendering])
734 AT_CAPTURE_FILE([input])
735 AT_DATA([input], [1 50
736 m4_for([x], [1], [50], [1], [@This is cell x in a series of 50.
738 AT_CHECK([render-test input], [0], [dnl
739 +------+------+------+------+------+------+------+------+------+------+------+
740 | This| This| This| This| This| This| This| This| This| This| This|
741 | is| is| is| is| is| is| is| is| is| is| is|
742 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell|
743 | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in|
744 |series|series|series|series|series|series|series|series|series| a| a|
745 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|
746 | | | | | | | | | |of 50.|of 50.|
747 +------+------+------+------+------+------+------+------+------+------+------+
749 +------+------+------+------+------+------+------+------+------+------+------+
750 | This| This| This| This| This| This| This| This| This| This| This|
751 | is| is| is| is| is| is| is| is| is| is| is|
752 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
753 | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in|
754 | a| a| a| a| a| a| a| a| a| a| a|
755 |series|series|series|series|series|series|series|series|series|series|series|
756 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
757 +------+------+------+------+------+------+------+------+------+------+------+
759 +------+------+------+------+------+------+------+------+------+------+------+
760 | This| This| This| This| This| This| This| This| This| This| This|
761 | is| is| is| is| is| is| is| is| is| is| is|
762 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
763 | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in|
764 | a| a| a| a| a| a| a| a| a| a| a|
765 |series|series|series|series|series|series|series|series|series|series|series|
766 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
767 +------+------+------+------+------+------+------+------+------+------+------+
769 +------+------+------+------+------+------+------+------+------+------+------+
770 | This| This| This| This| This| This| This| This| This| This| This|
771 | is| is| is| is| is| is| is| is| is| is| is|
772 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
773 | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in|
774 | a| a| a| a| a| a| a| a| a| a| a|
775 |series|series|series|series|series|series|series|series|series|series|series|
776 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
777 +------+------+------+------+------+------+------+------+------+------+------+
779 +------+------+------+------+------+------+
780 | This| This| This| This| This| This|
781 | is| is| is| is| is| is|
782 | cell| cell| cell| cell| cell| cell|
783 | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in|
785 |series|series|series|series|series|series|
786 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
787 +------+------+------+------+------+------+
789 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
790 +------+------+------+------+------+------+------+------+------+------+------+-
791 | This| This| This| This| This| This| This| This| This| This| This|
792 | is| is| is| is| is| is| is| is| is| is| is|
793 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell|
794 | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in|
795 |series|series|series|series|series|series|series|series|series| a| a|
796 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|s
797 | | | | | | | | | |of 50.|of 50.|o
798 +------+------+------+------+------+------+------+------+------+------+------+-
800 -----+------+------+------+------+------+------+------+------+------+------+---
801 This| This| This| This| This| This| This| This| This| This| This| T
802 is| is| is| is| is| is| is| is| is| is| is|
803 cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| c
804 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| 23
805 a| a| a| a| a| a| a| a| a| a| a|
806 eries|series|series|series|series|series|series|series|series|series|series|ser
807 f 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of
808 -----+------+------+------+------+------+------+------+------+------+------+---
810 ---+------+------+------+------+------+------+------+------+------+------+-----
811 his| This| This| This| This| This| This| This| This| This| This| Thi
812 is| is| is| is| is| is| is| is| is| is| is| i
813 ell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cel
814 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| 34 i
815 a| a| a| a| a| a| a| a| a| a| a|
816 ies|series|series|series|series|series|series|series|series|series|series|serie
817 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50
818 ---+------+------+------+------+------+------+------+------+------+------+-----
820 -+------+------+------+------+------+------+------+------+------+------+------+
821 s| This| This| This| This| This| This| This| This| This| This| This|
822 s| is| is| is| is| is| is| is| is| is| is| is|
823 l| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
824 n| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| 45 in|
825 a| a| a| a| a| a| a| a| a| a| a| a|
826 s|series|series|series|series|series|series|series|series|series|series|series|
827 .|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
828 -+------+------+------+------+------+------+------+------+------+------+------+
830 +------+------+------+------+------+
831 | This| This| This| This| This|
832 | is| is| is| is| is|
833 | cell| cell| cell| cell| cell|
834 | 46 in| 47 in| 48 in| 49 in| 50 in|
836 |series|series|series|series|series|
837 |of 50.|of 50.|of 50.|of 50.|of 50.|
838 +------+------+------+------+------+
842 AT_SETUP([breaking 2 rows of many small cells])
843 AT_KEYWORDS([render rendering])
844 AT_CAPTURE_FILE([input])
845 AT_DATA([input], [2 50
846 m4_for([x], [1], [100], [1], [@x
848 AT_CHECK([render-test input], [0], [dnl
849 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
850 | 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|
851 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
852 |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|
853 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
855 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
856 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
857 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
858 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
859 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
861 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
862 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
863 | 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|
864 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
865 |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|
866 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
868 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
869 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
870 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
871 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
872 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
876 AT_SETUP([breaking 3 rows with many joined cells])
877 AT_KEYWORDS([render rendering])
878 AT_CAPTURE_FILE([input])
879 AT_DATA([input], [3 49
880 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
881 A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var
883 m4_for([x], [2], [49], [1], [1*2 @x
886 AT_CHECK([render-test input], [0], [dnl
887 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
888 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
889 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
890 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
891 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
892 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
895 +---+---+---+---+----+
896 | 21| 22| 23| 24| 25|
897 +-+-+-+-+-+-+-+-+-+--+
898 45| 46| 47| 48| 49|50|
899 --+---+---+---+---+--+
901 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
902 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
903 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
904 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
905 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
906 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
907 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
910 +---+---+---+---+----+
911 | 21| 22| 23| 24| 25|
912 +-+-+-+-+-+-+-+-+-+--+
913 45| 46| 47| 48| 49|50|
914 --+---+---+---+---+--+
918 AT_SETUP([horz break 6x6, joined rows and columns])
919 AT_KEYWORDS([render rendering])
920 AT_DATA([input], [WEAVE_6X6])
921 AT_DATA([expout], [dnl
964 AT_CHECK([render-test --width=6 input], [0], [expout])
965 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
968 AT_SETUP([horz break 6x6, joined rows and columns, left header])
969 AT_KEYWORDS([render rendering])
970 AT_DATA([input], [WEAVE_6X6([1 0 0 0])])
971 AT_DATA([expout], [dnl
1000 AT_CHECK([render-test --width=10 input], [0], [expout])
1001 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1004 AT_SETUP([horz break 6x6, joined rows and columns, right header])
1005 AT_KEYWORDS([render rendering])
1006 AT_DATA([input], [WEAVE_6X6([0 1 0 0])])
1007 AT_DATA([expout], [dnl
1036 AT_CHECK([render-test --width=10 input], [0], [expout])
1037 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1040 AT_SETUP([breaking joined cells too wide for page])
1041 AT_KEYWORDS([render rendering])
1042 AT_DATA([input], [4 6
1043 1*6 @abc def ghi jkl
1056 AT_CHECK([render-test --width=10 input], [0], [dnl
1081 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [dnl
1108 AT_SETUP([breaking joined cells much too wide for page])
1109 AT_KEYWORDS([render rendering])
1110 AT_DATA([input], [4 6
1111 1*6 @abc def ghi jkl
1124 AT_CHECK([render-test --width=6 input], [0], [dnl
1161 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1200 AT_SETUP([breaking cell too wide for page, no border])
1201 AT_KEYWORDS([render rendering])
1202 AT_CAPTURE_FILE([input])
1203 AT_DATA([input], [1 1
1204 abcdefghijklmnopqrstuvwxyz
1206 AT_CHECK([render-test --width=6 input], [0], [dnl
1217 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1230 AT_SETUP([breaking cell too wide for page, with border])
1231 AT_KEYWORDS([render rendering])
1232 AT_CAPTURE_FILE([input])
1233 AT_DATA([input], [1 1
1234 @abcdefghijklmnopqrstuvwxyz
1236 AT_DATA([expout], [dnl
1257 AT_CHECK([render-test --width=6 input], [0], [expout])
1258 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
1261 AT_SETUP([horz break 8x8 with many 2x2 joins])
1262 AT_KEYWORDS([render rendering])
1263 AT_DATA([input], [WEAVE_8X8_2])
1264 AT_CHECK([render-test --width=8 input], [0],[dnl
1334 AT_CHECK([render-test -o mb0 --min-break=0 --width=8 input], [0],[dnl
1406 AT_BANNER([output rendering -- problematic procedures])
1408 dnl LIST used to put columns right up next to each other without any
1409 dnl intervening space, so this checks for regression.
1410 AT_SETUP([LIST puts space between columns])
1411 AT_KEYWORDS([render rendering])
1412 AT_DATA([list.sps], [dnl
1413 DATA LIST LIST NOTABLE /x y z (F1.0).
1421 AT_CHECK([pspp list.sps], [0], [dnl
1433 # Long string variables tend to end in lots of spaces. The ASCII
1434 # driver didn't handle this very well: it would essentially produce
1435 # one blank line in a cell for each trailing space. This test
1436 # checks for regression. See bug #38672.
1437 AT_SETUP([ASCII driver renders end of line spaces reasonably])
1438 AT_KEYWORDS([render rendering])
1439 AT_DATA([input], [dnl
1451 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
1462 # There was a bug that, when multiple cells spanned a single column
1463 # (or row), only the dimensions of the cell nearest the bottom of the
1464 # table were actually considered. This checks for regression. (This
1465 # problem was most easily observed with SYSFILE INFO, which uses lots
1466 # of spanned cells).
1468 # Without the fix, the output looks like this:
1475 AT_SETUP([multiple spanned cells all contribute to dimensions])
1476 AT_KEYWORDS([render rendering])
1477 AT_DATA([input], [dnl
1479 1*2 @A long text string.
1482 AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl
1483 +--------------------+
1484 | A long text string.|
1485 +--------------------+
1487 +--------------------+