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
559 AT_BANNER([output rendering -- horizontal page breaks])
561 AT_SETUP([breaking row of many small cells])
562 AT_KEYWORDS([render rendering])
563 AT_CAPTURE_FILE([input])
564 AT_DATA([input], [1 50
565 m4_for([x], [1], [50], [1], [@x
567 AT_CHECK([render-test input], [0], [dnl
568 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
569 |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|
570 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
572 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
573 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
574 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
576 AT_CHECK([render-test input -o mb0 --min-break=0], [0], [dnl
577 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
578 |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|
579 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
581 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
582 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
583 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
587 AT_SETUP([breaking row of many small cells, with headers])
588 AT_KEYWORDS([render rendering])
589 AT_CAPTURE_FILE([input])
590 AT_DATA([input], [1 54 2 2
593 m4_for([x], [1], [50], [1], [@x
598 AT_CHECK([render-test input], [0], [dnl
599 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
600 |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|
601 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
603 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
604 |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|
605 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
607 +--+--+--+--+--+--+--+
608 |ha|hb|48|49|50|hc|hd|
609 +--+--+--+--+--+--+--+
611 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
612 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
613 |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|
614 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
616 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
617 |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|
618 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
620 +--+--+--+--+--+--+--+
621 |ha|hb|48|49|50|hc|hd|
622 +--+--+--+--+--+--+--+
626 AT_SETUP([breaking row of many medium-size cells])
627 AT_KEYWORDS([render rendering])
628 AT_CAPTURE_FILE([input])
629 AT_DATA([input], [1 50
630 m4_for([x], [1], [50], [1], [@cell x
632 AT_CHECK([render-test input], [0], [dnl
633 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
634 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
635 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15|
636 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
638 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
639 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
640 | 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30|
641 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
643 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
644 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
645 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45|
646 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
648 +----+----+----+----+----+
649 |cell|cell|cell|cell|cell|
650 | 46| 47| 48| 49| 50|
651 +----+----+----+----+----+
653 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
654 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
655 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cel
656 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 1
657 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
659 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
660 l|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce
661 6| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31|
662 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
664 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
665 ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|c
666 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47|
667 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
676 AT_SETUP([breaking row of many medium-size cells, with headers])
677 AT_KEYWORDS([render rendering])
678 AT_CAPTURE_FILE([input])
679 AT_DATA([input], [1 52 1 1
681 m4_for([x], [1], [50], [1], [@cell x
685 AT_CHECK([render-test input], [0], [dnl
686 +----+----+----+----+----+----+----+----+----+----+----+----+
687 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
688 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12|
689 +----+----+----+----+----+----+----+----+----+----+----+----+
691 +----+----+----+----+----+----+----+----+----+----+----+----+
692 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
693 | 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24|
694 +----+----+----+----+----+----+----+----+----+----+----+----+
696 +----+----+----+----+----+----+----+----+----+----+----+----+
697 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
698 | 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36|
699 +----+----+----+----+----+----+----+----+----+----+----+----+
701 +----+----+----+----+----+----+----+----+----+----+----+----+
702 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
703 | 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48|
704 +----+----+----+----+----+----+----+----+----+----+----+----+
707 header1|cell|cell|header2
711 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
712 +----+----+----+----+----+----+----+----+----+----+----+----+--+
713 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
714 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| |
715 +----+----+----+----+----+----+----+----+----+----+----+----+--+
717 +--+----+----+----+----+----+----+----+----+----+----+----+----+
718 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
719 |13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25|
720 +--+----+----+----+----+----+----+----+----+----+----+----+----+
722 +----+----+----+----+----+----+----+----+----+----+----+----+--+
723 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
724 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| |
725 +----+----+----+----+----+----+----+----+----+----+----+----+--+
727 +--+----+----+----+----+----+----+----+----+----+----+----+----+
728 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
729 |38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50|
730 +--+----+----+----+----+----+----+----+----+----+----+----+----+
734 AT_SETUP([breaking row of many big narrow cells])
735 AT_KEYWORDS([render rendering])
736 AT_CAPTURE_FILE([input])
737 AT_DATA([input], [1 50
738 m4_for([x], [1], [50], [1], [@This is cell x in a series of 50.
740 AT_CHECK([render-test input], [0], [dnl
741 +------+------+------+------+------+------+------+------+------+------+------+
742 | This| This| This| This| This| This| This| This| This| This| This|
743 | is| is| is| is| is| is| is| is| is| is| is|
744 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell|
745 | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in|
746 |series|series|series|series|series|series|series|series|series| a| a|
747 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|
748 | | | | | | | | | |of 50.|of 50.|
749 +------+------+------+------+------+------+------+------+------+------+------+
751 +------+------+------+------+------+------+------+------+------+------+------+
752 | This| This| This| This| This| This| This| This| This| This| This|
753 | is| is| is| is| is| is| is| is| is| is| is|
754 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
755 | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in|
756 | a| a| a| a| a| a| a| a| a| a| a|
757 |series|series|series|series|series|series|series|series|series|series|series|
758 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
759 +------+------+------+------+------+------+------+------+------+------+------+
761 +------+------+------+------+------+------+------+------+------+------+------+
762 | This| This| This| This| This| This| This| This| This| This| This|
763 | is| is| is| is| is| is| is| is| is| is| is|
764 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
765 | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in|
766 | a| a| a| a| a| a| a| a| a| a| a|
767 |series|series|series|series|series|series|series|series|series|series|series|
768 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
769 +------+------+------+------+------+------+------+------+------+------+------+
771 +------+------+------+------+------+------+------+------+------+------+------+
772 | This| This| This| This| This| This| This| This| This| This| This|
773 | is| is| is| is| is| is| is| is| is| is| is|
774 | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
775 | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in|
776 | a| a| a| a| a| a| a| a| a| a| a|
777 |series|series|series|series|series|series|series|series|series|series|series|
778 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
779 +------+------+------+------+------+------+------+------+------+------+------+
781 +------+------+------+------+------+------+
782 | This| This| This| This| This| This|
783 | is| is| is| is| is| is|
784 | cell| cell| cell| cell| cell| cell|
785 | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in|
787 |series|series|series|series|series|series|
788 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
789 +------+------+------+------+------+------+
791 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
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 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell|
796 | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in|
797 |series|series|series|series|series|series|series|series|series| a| a|
798 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|s
799 | | | | | | | | | |of 50.|of 50.|o
800 +------+------+------+------+------+------+------+------+------+------+------+-
802 -----+------+------+------+------+------+------+------+------+------+------+---
803 This| This| This| This| This| This| This| This| This| This| This| T
804 is| is| is| is| is| is| is| is| is| is| is|
805 cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| c
806 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| 23
807 a| a| a| a| a| a| a| a| a| a| a|
808 eries|series|series|series|series|series|series|series|series|series|series|ser
809 f 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of
810 -----+------+------+------+------+------+------+------+------+------+------+---
812 ---+------+------+------+------+------+------+------+------+------+------+-----
813 his| This| This| This| This| This| This| This| This| This| This| Thi
814 is| is| is| is| is| is| is| is| is| is| is| i
815 ell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cel
816 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| 34 i
817 a| a| a| a| a| a| a| a| a| a| a|
818 ies|series|series|series|series|series|series|series|series|series|series|serie
819 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50
820 ---+------+------+------+------+------+------+------+------+------+------+-----
822 -+------+------+------+------+------+------+------+------+------+------+------+
823 s| This| This| This| This| This| This| This| This| This| This| This|
824 s| is| is| is| is| is| is| is| is| is| is| is|
825 l| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell|
826 n| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| 45 in|
827 a| a| a| a| a| a| a| a| a| a| a| a|
828 s|series|series|series|series|series|series|series|series|series|series|series|
829 .|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
830 -+------+------+------+------+------+------+------+------+------+------+------+
832 +------+------+------+------+------+
833 | This| This| This| This| This|
834 | is| is| is| is| is|
835 | cell| cell| cell| cell| cell|
836 | 46 in| 47 in| 48 in| 49 in| 50 in|
838 |series|series|series|series|series|
839 |of 50.|of 50.|of 50.|of 50.|of 50.|
840 +------+------+------+------+------+
844 AT_SETUP([breaking 2 rows of many small cells])
845 AT_KEYWORDS([render rendering])
846 AT_CAPTURE_FILE([input])
847 AT_DATA([input], [2 50
848 m4_for([x], [1], [100], [1], [@x
850 AT_CHECK([render-test input], [0], [dnl
851 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
852 | 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|
853 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
854 |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|
855 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
857 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
858 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
859 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
860 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
861 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
863 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
864 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
865 | 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|
866 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
867 |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|
868 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
870 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
871 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
872 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
873 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
874 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
878 AT_SETUP([breaking 3 rows with many joined cells])
879 AT_KEYWORDS([render rendering])
880 AT_CAPTURE_FILE([input])
881 AT_DATA([input], [3 49
882 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
883 A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var
885 m4_for([x], [2], [49], [1], [1*2 @x
888 AT_CHECK([render-test input], [0], [dnl
889 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
890 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
891 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
892 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
893 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
894 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
897 +---+---+---+---+----+
898 | 21| 22| 23| 24| 25|
899 +-+-+-+-+-+-+-+-+-+--+
900 45| 46| 47| 48| 49|50|
901 --+---+---+---+---+--+
903 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [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 x y z A B C D E F G H I J K L M
905 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
906 |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
907 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
908 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
909 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
912 +---+---+---+---+----+
913 | 21| 22| 23| 24| 25|
914 +-+-+-+-+-+-+-+-+-+--+
915 45| 46| 47| 48| 49|50|
916 --+---+---+---+---+--+
920 AT_SETUP([horz break 6x6, joined rows and columns])
921 AT_KEYWORDS([render rendering])
922 AT_DATA([input], [WEAVE_6X6])
923 AT_DATA([expout], [dnl
966 AT_CHECK([render-test --width=6 input], [0], [expout])
967 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
970 AT_SETUP([horz break 6x6, joined rows and columns, left header])
971 AT_KEYWORDS([render rendering])
972 AT_DATA([input], [WEAVE_6X6([1 0 0 0])])
973 AT_DATA([expout], [dnl
1002 AT_CHECK([render-test --width=10 input], [0], [expout])
1003 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1006 AT_SETUP([horz break 6x6, joined rows and columns, right header])
1007 AT_KEYWORDS([render rendering])
1008 AT_DATA([input], [WEAVE_6X6([0 1 0 0])])
1009 AT_DATA([expout], [dnl
1038 AT_CHECK([render-test --width=10 input], [0], [expout])
1039 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1042 AT_SETUP([breaking joined cells too wide for page])
1043 AT_KEYWORDS([render rendering])
1044 AT_DATA([input], [4 6
1045 1*6 @abc def ghi jkl
1058 AT_CHECK([render-test --width=10 input], [0], [dnl
1083 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [dnl
1110 AT_SETUP([breaking joined cells much too wide for page])
1111 AT_KEYWORDS([render rendering])
1112 AT_DATA([input], [4 6
1113 1*6 @abc def ghi jkl
1126 AT_CHECK([render-test --width=6 input], [0], [dnl
1163 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1202 AT_SETUP([breaking cell too wide for page, no border])
1203 AT_KEYWORDS([render rendering])
1204 AT_CAPTURE_FILE([input])
1205 AT_DATA([input], [1 1
1206 abcdefghijklmnopqrstuvwxyz
1208 AT_CHECK([render-test --width=6 input], [0], [dnl
1219 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1232 AT_SETUP([breaking cell too wide for page, with border])
1233 AT_KEYWORDS([render rendering])
1234 AT_CAPTURE_FILE([input])
1235 AT_DATA([input], [1 1
1236 @abcdefghijklmnopqrstuvwxyz
1238 AT_DATA([expout], [dnl
1259 AT_CHECK([render-test --width=6 input], [0], [expout])
1260 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
1263 AT_SETUP([horz break 8x8 with many 2x2 joins])
1264 AT_KEYWORDS([render rendering])
1265 AT_DATA([input], [WEAVE_8X8_2])
1266 AT_CHECK([render-test --width=8 input], [0],[dnl
1336 AT_CHECK([render-test -o mb0 --min-break=0 --width=8 input], [0],[dnl
1408 AT_BANNER([output rendering -- problematic procedures])
1410 dnl LIST used to put columns right up next to each other without any
1411 dnl intervening space, so this checks for regression.
1412 AT_SETUP([LIST puts space between columns])
1413 AT_KEYWORDS([render rendering])
1414 AT_DATA([list.sps], [dnl
1415 DATA LIST LIST NOTABLE /x y z (F1.0).
1423 AT_CHECK([pspp list.sps], [0], [dnl
1435 # Long string variables tend to end in lots of spaces. The ASCII
1436 # driver didn't handle this very well: it would essentially produce
1437 # one blank line in a cell for each trailing space. This test
1438 # checks for regression. See bug #38672.
1439 AT_SETUP([ASCII driver renders end of line spaces reasonably])
1440 AT_KEYWORDS([render rendering])
1441 AT_DATA([input], [dnl
1453 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
1464 # There was a bug that, when multiple cells spanned a single column
1465 # (or row), only the dimensions of the cell nearest the bottom of the
1466 # table were actually considered. This checks for regression. (This
1467 # problem was most easily observed with SYSFILE INFO, which uses lots
1468 # of spanned cells).
1470 # Without the fix, the output looks like this:
1477 AT_SETUP([multiple spanned cells all contribute to dimensions])
1478 AT_KEYWORDS([render rendering])
1479 AT_DATA([input], [dnl
1481 1*2 @A long text string.
1484 AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl
1485 +--------------------+
1486 | A long text string.|
1487 +--------------------+
1489 +--------------------+