output: Add footnote support.
[pspp] / tests / output / render.at
1 # +-+---+-+-+-+
2 # |a|bcd|e|f|i|
3 # +-+-+-+-+g+-+
4 # |j|m|nop|h|q|
5 # |k+-+-+-+-+r|
6 # |l|t|w|xyz|s|
7 # +-+u+-+-+-+-+
8 # |A|v|B|E|FGH|
9 # +-+-+C+-+-+-+
10 # |IJK|D|L|O|P|
11 # +-+-+-+M+-+-+
12 # |Q|RST|N|U|V|
13 # +-+---+-+-+-+
14 m4_define([WEAVE_6X6],
15   [6 6 $1
16 @a
17 1*2 @bcd
18 @e
19 2*1 @f\ng\nh
20 @i
21 2*1 @j\nk\nl
22 @m
23 1*2 @nop
24 2*1 @q\nr\ns
25 2*1 @t\nu\nv
26 @w
27 1*2 @xyz
28 @A
29 2*1 @B\nC\nD
30 @E
31 1*2 @FGH
32 1*2 @IJK
33 2*1 @L\nM\nN
34 @O
35 @P
36 @Q
37 1*2 @RST
38 @U
39 @V
40 ])
41
42 # +-+-+-+-+-+-+-+-+
43 # |a|b|c|d|e|f|g|h|
44 # +-+-+-+-+-+-+-+-+
45 # |i|jkl|m|nop|q|t|
46 # +-+-+-+-+-+-+r+-+
47 # |u|v|wxy|z|A|s|D|
48 # +-+-+-+-+-+B+-+-+
49 # |E|F|I|JKL|C|M|P|
50 # +-+G+-+---+-+N+-+
51 # |Q|H|R|UVW|X|O|Y|
52 # +-+-+S+-+-+-+-+-+
53 # |Z|0|T|3|456|7|8|
54 # +-+1+-+-+-+-+-+-+
55 # |9|2|abc|d|efg|h|
56 # +-+-+-+-+-+-+-+-+
57 # |i|j|k|l|m|n|o|p|
58 # +-+-+-+-+-+-+-+-+
59 m4_define([WEAVE_8X8],
60   [8 8 $1
61 @a
62 @b
63 @c
64 @d
65 @e
66 @f
67 @g
68 @h
69 @i
70 1*2 @jkl
71 @m
72 1*2 @nop
73 2*1 @q\nr\ns
74 @t
75 @u
76 @v
77 1*2 @wxy
78 @z
79 2*1 @A\nB\nC
80 @D
81 @E
82 2*1 @F\nG\nH
83 @I
84 1*2 @JKL
85 2*1 @M\nN\nO
86 @P
87 @Q
88 2*1 @R\nS\nT
89 1*2 @UVW
90 @X
91 @Y
92 @Z
93 2*1 @0\n1\n2
94 @3
95 1*2 @456
96 @7
97 @8
98 @9
99 1*2 @abc
100 @d
101 1*2 @efg
102 @h
103 @i
104 @j
105 @k
106 @l
107 @m
108 @n
109 @o
110 @p
111 ])
112
113 # This input is something of a counterexample, in that it could render
114 # compactly as this if the algorithm for choosing cell widths and
115 # heights were smarter:
116 #
117 # +---+---+---+-+-+
118 # |abc|jkl|mno|v|x|
119 # |def+---+pqr+-+-+
120 # |ghi|yzA|stu|HIJ|
121 # +-+-+BCD+-+-+KLM|
122 # |Q|V|EFG|W|Z|NOP|
123 # |R+-+-+-+X+-+-+-+
124 # |S|012|9|Y|abc|j|
125 # |T|345+-+-+def|k|
126 # |U|678|opq|ghi|l|
127 # +-+-+-+rst+---+m|
128 # |xyz|G|uvw|JKL|n|
129 # |ABC|H+---+-+-+-+
130 # |DEF|I|MNOPQ|123|
131 # +---+-+RSTUV|456|
132 # |abcde|WXYZ0|789|
133 # +-----+-----+---+
134 m4_define([WEAVE_8X8_2],
135   [8 8 $1
136 2*2 @abc\ndef\nghi
137 1*2 @jkl
138 2*2 @mno\npqr\nstu
139 1*2 @vwx
140 2*2 @yzA\nBCD\nEFG
141 2*2 @HIJ\nKLM\nNOP
142 3*1 @Q\nR\nS\nT\nU
143 @V
144 2*1 @W\nX\nY
145 @Z
146 2*2 @012\n345\n678
147 @9
148 2*2 @abc\ndef\nghi
149 3*1 @j\nk\nl\nm\nn
150 2*2 @opq\nrst\nuvw
151 2*2 @xyz\nABC\nDEF
152 2*1 @G\nH\nI
153 1*2 @JKL
154 2*3 @MNOPQ\nRSTUV\nWXYZ0
155 2*2 @123\n456\n789
156 1*3 @abcde
157 ])
158 \f
159 AT_BANNER([output rendering -- no page breaking])
160
161 AT_SETUP([single cell])
162 AT_KEYWORDS([render rendering])
163 AT_DATA([input], [1 1
164 abc
165 ])
166 AT_CHECK([render-test input], [0], [abc
167 ])
168 AT_CLEANUP
169
170 AT_SETUP([nested single cell])
171 AT_KEYWORDS([render rendering])
172 AT_DATA([input], [1 1
173 abc
174 1 1
175 {0}
176 ])
177 AT_CHECK([render-test input], [0], [abc
178 ])
179 AT_CLEANUP
180
181 AT_SETUP([single cell with border])
182 AT_KEYWORDS([render rendering])
183 AT_DATA([input], [1 1
184 @abc
185 ])
186 AT_CHECK([render-test input], [0], [dnl
187 +---+
188 |abc|
189 +---+
190 ])
191 AT_CLEANUP
192
193 AT_SETUP([nested single cell with border])
194 AT_KEYWORDS([render rendering])
195 AT_DATA([input], [1 1
196 @abc
197 1 1
198 @{0}
199 ])
200 AT_CHECK([render-test input], [0], [dnl
201 +-----+
202 |+---+|
203 ||abc||
204 |+---+|
205 +-----+
206 ])
207 AT_CLEANUP
208
209 AT_SETUP([joined columns])
210 AT_KEYWORDS([render rendering])
211 AT_DATA([input], [2 2
212 1*2 @abcdefg
213 @hij
214 @klm
215 ])
216 AT_CHECK([render-test input], [0], [dnl
217 +-------+
218 |abcdefg|
219 +---+---+
220 |hij|klm|
221 +---+---+
222 ])
223 AT_CLEANUP
224
225 AT_SETUP([3x3, joined rows and columns])
226 AT_KEYWORDS([render rendering])
227 AT_DATA([input], [3 3
228 1*2 @abc
229 2*1 @d\ne\nf
230 2*1 @g\nh\ni
231 @j
232 1*2 @klm
233 ])
234 AT_CHECK([render-test input], [0], [dnl
235 +---+-+
236 |abc|d|
237 +-+-+e|
238 |g|j|f|
239 |h+-+-+
240 |i|klm|
241 +-+---+
242 ])
243 AT_CLEANUP
244
245 AT_SETUP([joined rows and columns (with footnotes)])
246 AT_KEYWORDS([render rendering footnote])
247 AT_DATA([input], [3 3
248 1*2 @abc#Approximation.
249 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.
250 2*1 @g\nh\ni#One#Two#Three
251 @j
252 1*2 @klm
253 ])
254 AT_CHECK([render-test --csv input], [0],
255 [[+------------+----+
256 |      abc[a]|   d|
257 +----------+-+   e|
258 |         g|j|f[b]|
259 |         h+-+----+
260 |i[c][d][e]|   klm|
261 +----------+------+
262 [a] Approximation.
263 [b] This is a very long footnote that will have to wrap from one line to the
264     next.  Let's see if the rendering engine does it acceptably.
265 [c] One
266 [d] Two
267 [e] Three
268 ]])
269 AT_CHECK([cat render.csv], [0],
270 [[abc[a],,"d
271 e
272 f[b]"
273 "g
274 h
275 i[c][d][e]",j,
276 ,klm,
277
278 Footnotes:
279 a,Approximation.
280 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.
281 c,One
282 d,Two
283 e,Three
284 ]])
285 AT_CLEANUP
286
287 AT_SETUP([6x6, joined rows and columns])
288 AT_KEYWORDS([render rendering])
289 AT_DATA([input], [WEAVE_6X6])
290 AT_CHECK([render-test input], [0], [dnl
291 +-+---+-+-+-+
292 |a|bcd|e|f|i|
293 +-+-+-+-+g+-+
294 |j|m|nop|h|q|
295 |k+-+-+-+-+r|
296 |l|t|w|xyz|s|
297 +-+u+-+-+-+-+
298 |A|v|B|E|FGH|
299 +-+-+C+-+-+-+
300 |IJK|D|L|O|P|
301 +-+-+-+M+-+-+
302 |Q|RST|N|U|V|
303 +-+---+-+-+-+
304 ])
305 AT_CLEANUP
306
307 AT_SETUP([3 rows with many joined cells])
308 AT_KEYWORDS([render rendering])
309 AT_CAPTURE_FILE([input])
310 AT_DATA([input], [3 19
311 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
312 ])@1
313 m4_for([x], [2], [19], [1], [1*2 @x
314 ])@20
315 ])
316 AT_CHECK([render-test input], [0], [dnl
317  a b c d e f g h i j k l m n o p q r  s
318 +-+---+---+---+---+---+---+---+---+----+
319 |1|  2|  3|  4|  5|  6|  7|  8|  9|  10|
320 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
321 | 11| 12| 13| 14| 15| 16| 17| 18| 19|20|
322 +---+---+---+---+---+---+---+---+---+--+
323 ])
324 AT_CLEANUP
325
326 AT_SETUP([3 columns with many joined cells])
327 AT_KEYWORDS([render rendering])
328 AT_CAPTURE_FILE([input])
329 AT_DATA([input], [3 19
330 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
331 ])@1
332 m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
333 ])@20
334 ])
335 AT_CHECK([render-test --transpose input], [0], [dnl
336  +--+--+
337 a| 1|11|
338  +--+ab|
339 b| 2|cd|
340  |ab+--+
341 c|cd|12|
342  +--+ab|
343 d| 3|cd|
344  |ab+--+
345 e|cd|13|
346  +--+ab|
347 f| 4|cd|
348  |ab+--+
349 g|cd|14|
350  +--+ab|
351 h| 5|cd|
352  |ab+--+
353 i|cd|15|
354  +--+ab|
355 j| 6|cd|
356  |ab+--+
357 k|cd|16|
358  +--+ab|
359 l| 7|cd|
360  |ab+--+
361 m|cd|17|
362  +--+ab|
363 n| 8|cd|
364  |ab+--+
365 o|cd|18|
366  +--+ab|
367 p| 9|cd|
368  |ab+--+
369 q|cd|19|
370  +--+ab|
371 r|10|cd|
372  |ab+--+
373 s|cd|20|
374  +--+--+
375 ])
376 AT_CLEANUP
377
378 AT_SETUP([joined rows])
379 AT_KEYWORDS([render rendering])
380 AT_DATA([input], [2 2
381 2*1 @ab\ncd\nef
382 @hij
383 @klm
384 ])
385 AT_CHECK([render-test input], [0], [dnl
386 +--+---+
387 |ab|hij|
388 |cd+---+
389 |ef|klm|
390 +--+---+
391 ])
392 AT_CLEANUP
393
394 AT_SETUP([nested joined rows])
395 AT_KEYWORDS([render rendering])
396 AT_DATA([input], [2 2
397 2*1 @ab\ncd\nef
398 @hij
399 @klm
400 1 1
401 @{0}
402 ])
403 AT_CHECK([render-test input], [0], [dnl
404 +--------+
405 |+--+---+|
406 ||ab|hij||
407 ||cd+---+|
408 ||ef|klm||
409 |+--+---+|
410 +--------+
411 ])
412 AT_CLEANUP
413
414 dnl This checks for bug #31346, a segmentation fault that surfaced
415 dnl when two or more rows  had no unspanned cells and no rules.
416 AT_SETUP([joined rows only, no rules])
417 AT_KEYWORDS([render rendering])
418 AT_DATA([input], [2 2
419 2*1 ab\ncd\nef
420 2*1 hij\nklm\nnop
421 ])
422 AT_CHECK([render-test input], [0], [dnl
423 ab hij
424 cd klm
425 ef nop
426 ])
427 AT_CLEANUP
428
429 AT_SETUP([joined columns only, no rules])
430 AT_KEYWORDS([render rendering])
431 AT_DATA([input], [2 2
432 1*2 abc\ndef
433 1*2 hij\nklm\nnop
434 ])
435 AT_CHECK([render-test input], [0], [dnl
436 abc
437 def
438 hij
439 klm
440 nop
441 ])
442 AT_CLEANUP
443
444 AT_SETUP([5 big narrow cells])
445 AT_KEYWORDS([render rendering])
446 AT_DATA([input], [1 5
447 @This cell has a lot of text but its minimum width is pretty narrow.
448 @This cell also has a lot of text but its minimum width is pretty narrow.
449 @A third cell with a lot of text but a pretty narrow minimum width.
450 @A fourth cell with a lot of text but a pretty narrow minimum width.
451 @A fifth cell with a lot of text but a pretty narrow minimum width.
452 ])
453 AT_CHECK([render-test input], [0], [dnl
454 +---------------+---------------+--------------+---------------+--------------+
455 |This cell has a| This cell also|  A third cell|  A fourth cell|  A fifth cell|
456 |lot of text but|   has a lot of| with a lot of|  with a lot of| with a lot of|
457 |    its minimum|   text but its|    text but a|     text but a|    text but a|
458 |width is pretty|  minimum width| pretty narrow|  pretty narrow| pretty narrow|
459 |        narrow.|      is pretty|minimum width.| minimum width.|minimum width.|
460 |               |        narrow.|              |               |              |
461 +---------------+---------------+--------------+---------------+--------------+
462 ])
463 AT_CLEANUP
464
465 AT_SETUP([9 big narrow cells])
466 AT_KEYWORDS([render rendering])
467 AT_DATA([input], [1 9
468 @This cell has a lot of text but its minimum width is pretty narrow.
469 @This cell also has a lot of text but its minimum width is pretty narrow.
470 @A third cell with a lot of text but a pretty narrow minimum width.
471 @A fourth cell with a lot of text but a pretty narrow minimum width.
472 @A fifth cell with a lot of text but a pretty narrow minimum width.
473 @A sixth cell with a lot of text but a pretty narrow minimum width.
474 @A seventh cell with a lot of text but a pretty narrow minimum width.
475 @A eighth cell with a lot of text but a pretty narrow minimum width.
476 @A ninth cell with a lot of text but a pretty narrow minimum width.
477 ])
478 AT_CHECK([render-test input], [0], [dnl
479 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
480 |    This|   This| A third|A fourth|A fifth| A sixth|       A|      A| A ninth|
481 |cell has|   cell|    cell|    cell|   cell|    cell| seventh| eighth|    cell|
482 |a lot of|   also|  with a|  with a| with a|  with a|    cell|   cell|  with a|
483 |text but|  has a|  lot of|  lot of| lot of|  lot of|  with a| with a|  lot of|
484 |     its| lot of|text but|text but|   text|text but|  lot of| lot of|text but|
485 | minimum|   text|a pretty|a pretty|  but a|a pretty|text but|   text|a pretty|
486 |width is|but its|  narrow|  narrow| pretty|  narrow|a pretty|  but a|  narrow|
487 |  pretty|minimum| minimum| minimum| narrow| minimum|  narrow| pretty| minimum|
488 | narrow.|  width|  width.|  width.|minimum|  width.| minimum| narrow|  width.|
489 |        |     is|        |        | width.|        |  width.|minimum|        |
490 |        | pretty|        |        |       |        |        | width.|        |
491 |        |narrow.|        |        |       |        |        |       |        |
492 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
493 ])
494 AT_CLEANUP
495
496 AT_SETUP([2 big cells with new-lines])
497 AT_KEYWORDS([render rendering])
498 AT_DATA([input], [1 2
499 @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.
500 @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.
501 ])
502 AT_CHECK([render-test input], [0], [dnl
503 +----------------------------------------------------------+------------------+
504 |      PSPP does not place many restrictions on ordering of|     PSPP includes|
505 |  commands. The main restriction is that variables must be|   special support|
506 |       defined before they are otherwise referenced.  This|       for unknown|
507 |    section describes the details of command ordering, but|      numeric data|
508 |       most users will have no need to refer to them. PSPP|           values.|
509 |     possesses five internal states, called initial, INPUT|           Missing|
510 | PROGRAM, FILE TYPE, transformation, and procedure states.|  observations are|
511 |                                                          |          assigned|
512 |                                                          |  a special value,|
513 |                                                          |        called the|
514 |                                                          |  ``system‑missing|
515 |                                                          |    value''.  This|
516 |                                                          |``value'' actually|
517 |                                                          |     indicates the|
518 |                                                          |      absence of a|
519 |                                                          |         value; it|
520 |                                                          |    means that the|
521 |                                                          |            actual|
522 |                                                          | value is unknown.|
523 +----------------------------------------------------------+------------------+
524 ])
525 AT_CLEANUP
526
527 AT_SETUP([8x8 with many 2x2 joins])
528 AT_KEYWORDS([render rendering])
529 AT_DATA([input], [WEAVE_8X8_2])
530 AT_CHECK([render-test input], [0],[dnl
531 +---+---+----+----+
532 |abc|jkl| mno| vwx|
533 |def|   | pqr|    |
534 |ghi+---+ stu+----+
535 |   |yzA|    | HIJ|
536 +-+-+BCD+-+--+ KLM|
537 |Q|V|EFG|W| Z| NOP|
538 |R| |   |X|  |    |
539 |S+-+-+-+Y+--+-+--+
540 |T|012|9| | abc| j|
541 |U|345| | | def| k|
542 | |678+-+-+ ghi| l|
543 | |   |opq|    | m|
544 +-+-+-+rst+----+ n|
545 |xyz|G|uvw| JKL|  |
546 |ABC|H|   |    |  |
547 |DEF|I+---+--+-+--+
548 |   | | MNOPQ| 123|
549 +---+-+ RSTUV| 456|
550 |abcde| WXYZ0| 789|
551 |     |      |    |
552 +-----+------+----+
553 ])
554 AT_CLEANUP
555
556 AT_SETUP([nested 8x8])
557 AT_KEYWORDS([render rendering])
558 AT_DATA([input], [WEAVE_8X8[]dnl
559 1 1
560 @{0}
561 ])
562 AT_CHECK([render-test input], [0], [dnl
563 +-----------------+
564 |+-+-+-+-+-+-+-+-+|
565 ||a|b|c|d|e|f|g|h||
566 |+-+-+-+-+-+-+-+-+|
567 ||i|jkl|m|nop|q|t||
568 |+-+-+-+-+-+-+r+-+|
569 ||u|v|wxy|z|A|s|D||
570 |+-+-+-+-+-+B+-+-+|
571 ||E|F|I|JKL|C|M|P||
572 |+-+G+-+---+-+N+-+|
573 ||Q|H|R|UVW|X|O|Y||
574 |+-+-+S+-+-+-+-+-+|
575 ||Z|0|T|3|456|7|8||
576 |+-+1+-+-+-+-+-+-+|
577 ||9|2|abc|d|efg|h||
578 |+-+-+-+-+-+-+-+-+|
579 ||i|j|k|l|m|n|o|p||
580 |+-+-+-+-+-+-+-+-+|
581 +-----------------+
582 ])
583 AT_CLEANUP
584
585 AT_SETUP([nested 8x8s and 6x6s])
586 AT_KEYWORDS([render rendering])
587 AT_DATA([input], [WEAVE_8X8[]WEAVE_6X6[]dnl
588 4 2
589 @{0}
590 @{1}
591 @{1}
592 @|{1}
593 @|{1}
594 @({1}
595 @({1}
596 @{0}
597 ])
598 AT_CHECK([render-test input], [0], [dnl
599 +-----------------+-----------------+
600 |+-+-+-+-+-+-+-+-+|    +-+---+-+-+-+|
601 ||a|b|c|d|e|f|g|h||    |a|bcd|e|f|i||
602 |+-+-+-+-+-+-+-+-+|    +-+-+-+-+g+-+|
603 ||i|jkl|m|nop|q|t||    |j|m|nop|h|q||
604 |+-+-+-+-+-+-+r+-+|    |k+-+-+-+-+r||
605 ||u|v|wxy|z|A|s|D||    |l|t|w|xyz|s||
606 |+-+-+-+-+-+B+-+-+|    +-+u+-+-+-+-+|
607 ||E|F|I|JKL|C|M|P||    |A|v|B|E|FGH||
608 |+-+G+-+---+-+N+-+|    +-+-+C+-+-+-+|
609 ||Q|H|R|UVW|X|O|Y||    |IJK|D|L|O|P||
610 |+-+-+S+-+-+-+-+-+|    +-+-+-+M+-+-+|
611 ||Z|0|T|3|456|7|8||    |Q|RST|N|U|V||
612 |+-+1+-+-+-+-+-+-+|    +-+---+-+-+-+|
613 ||9|2|abc|d|efg|h||                 |
614 |+-+-+-+-+-+-+-+-+|                 |
615 ||i|j|k|l|m|n|o|p||                 |
616 |+-+-+-+-+-+-+-+-+|                 |
617 +-----------------+-----------------+
618 |    +-+---+-+-+-+|  +-+---+-+-+-+  |
619 |    |a|bcd|e|f|i||  |a|bcd|e|f|i|  |
620 |    +-+-+-+-+g+-+|  +-+-+-+-+g+-+  |
621 |    |j|m|nop|h|q||  |j|m|nop|h|q|  |
622 |    |k+-+-+-+-+r||  |k+-+-+-+-+r|  |
623 |    |l|t|w|xyz|s||  |l|t|w|xyz|s|  |
624 |    +-+u+-+-+-+-+|  +-+u+-+-+-+-+  |
625 |    |A|v|B|E|FGH||  |A|v|B|E|FGH|  |
626 |    +-+-+C+-+-+-+|  +-+-+C+-+-+-+  |
627 |    |IJK|D|L|O|P||  |IJK|D|L|O|P|  |
628 |    +-+-+-+M+-+-+|  +-+-+-+M+-+-+  |
629 |    |Q|RST|N|U|V||  |Q|RST|N|U|V|  |
630 |    +-+---+-+-+-+|  +-+---+-+-+-+  |
631 +-----------------+-----------------+
632 |  +-+---+-+-+-+  |+-+---+-+-+-+    |
633 |  |a|bcd|e|f|i|  ||a|bcd|e|f|i|    |
634 |  +-+-+-+-+g+-+  |+-+-+-+-+g+-+    |
635 |  |j|m|nop|h|q|  ||j|m|nop|h|q|    |
636 |  |k+-+-+-+-+r|  ||k+-+-+-+-+r|    |
637 |  |l|t|w|xyz|s|  ||l|t|w|xyz|s|    |
638 |  +-+u+-+-+-+-+  |+-+u+-+-+-+-+    |
639 |  |A|v|B|E|FGH|  ||A|v|B|E|FGH|    |
640 |  +-+-+C+-+-+-+  |+-+-+C+-+-+-+    |
641 |  |IJK|D|L|O|P|  ||IJK|D|L|O|P|    |
642 |  +-+-+-+M+-+-+  |+-+-+-+M+-+-+    |
643 |  |Q|RST|N|U|V|  ||Q|RST|N|U|V|    |
644 |  +-+---+-+-+-+  |+-+---+-+-+-+    |
645 +-----------------+-----------------+
646 |+-+---+-+-+-+    |+-+-+-+-+-+-+-+-+|
647 ||a|bcd|e|f|i|    ||a|b|c|d|e|f|g|h||
648 |+-+-+-+-+g+-+    |+-+-+-+-+-+-+-+-+|
649 ||j|m|nop|h|q|    ||i|jkl|m|nop|q|t||
650 ||k+-+-+-+-+r|    |+-+-+-+-+-+-+r+-+|
651 ||l|t|w|xyz|s|    ||u|v|wxy|z|A|s|D||
652 |+-+u+-+-+-+-+    |+-+-+-+-+-+B+-+-+|
653 ||A|v|B|E|FGH|    ||E|F|I|JKL|C|M|P||
654 |+-+-+C+-+-+-+    |+-+G+-+---+-+N+-+|
655 ||IJK|D|L|O|P|    ||Q|H|R|UVW|X|O|Y||
656 |+-+-+-+M+-+-+    |+-+-+S+-+-+-+-+-+|
657 ||Q|RST|N|U|V|    ||Z|0|T|3|456|7|8||
658 |+-+---+-+-+-+    |+-+1+-+-+-+-+-+-+|
659 |                 ||9|2|abc|d|efg|h||
660 |                 |+-+-+-+-+-+-+-+-+|
661 |                 ||i|j|k|l|m|n|o|p||
662 |                 |+-+-+-+-+-+-+-+-+|
663 +-----------------+-----------------+
664 ])
665 AT_CLEANUP
666
667 AT_SETUP([doubly nested cells])
668 AT_KEYWORDS([render rendering])
669 AT_DATA([input], [WEAVE_8X8[]WEAVE_6X6[]dnl
670 4 2
671 @{0}
672 @{1}
673 @{1}
674 @|{1}
675 @|{1}
676 @({1}
677 @({1}
678 @{0}
679 1 1
680 @{2}
681 ])
682 AT_CHECK([render-test input --length=70], [0], [dnl
683 +-------------------------------------+
684 |+-----------------+-----------------+|
685 ||+-+-+-+-+-+-+-+-+|    +-+---+-+-+-+||
686 |||a|b|c|d|e|f|g|h||    |a|bcd|e|f|i|||
687 ||+-+-+-+-+-+-+-+-+|    +-+-+-+-+g+-+||
688 |||i|jkl|m|nop|q|t||    |j|m|nop|h|q|||
689 ||+-+-+-+-+-+-+r+-+|    |k+-+-+-+-+r|||
690 |||u|v|wxy|z|A|s|D||    |l|t|w|xyz|s|||
691 ||+-+-+-+-+-+B+-+-+|    +-+u+-+-+-+-+||
692 |||E|F|I|JKL|C|M|P||    |A|v|B|E|FGH|||
693 ||+-+G+-+---+-+N+-+|    +-+-+C+-+-+-+||
694 |||Q|H|R|UVW|X|O|Y||    |IJK|D|L|O|P|||
695 ||+-+-+S+-+-+-+-+-+|    +-+-+-+M+-+-+||
696 |||Z|0|T|3|456|7|8||    |Q|RST|N|U|V|||
697 ||+-+1+-+-+-+-+-+-+|    +-+---+-+-+-+||
698 |||9|2|abc|d|efg|h||                 ||
699 ||+-+-+-+-+-+-+-+-+|                 ||
700 |||i|j|k|l|m|n|o|p||                 ||
701 ||+-+-+-+-+-+-+-+-+|                 ||
702 |+-----------------+-----------------+|
703 ||    +-+---+-+-+-+|  +-+---+-+-+-+  ||
704 ||    |a|bcd|e|f|i||  |a|bcd|e|f|i|  ||
705 ||    +-+-+-+-+g+-+|  +-+-+-+-+g+-+  ||
706 ||    |j|m|nop|h|q||  |j|m|nop|h|q|  ||
707 ||    |k+-+-+-+-+r||  |k+-+-+-+-+r|  ||
708 ||    |l|t|w|xyz|s||  |l|t|w|xyz|s|  ||
709 ||    +-+u+-+-+-+-+|  +-+u+-+-+-+-+  ||
710 ||    |A|v|B|E|FGH||  |A|v|B|E|FGH|  ||
711 ||    +-+-+C+-+-+-+|  +-+-+C+-+-+-+  ||
712 ||    |IJK|D|L|O|P||  |IJK|D|L|O|P|  ||
713 ||    +-+-+-+M+-+-+|  +-+-+-+M+-+-+  ||
714 ||    |Q|RST|N|U|V||  |Q|RST|N|U|V|  ||
715 ||    +-+---+-+-+-+|  +-+---+-+-+-+  ||
716 |+-----------------+-----------------+|
717 ||  +-+---+-+-+-+  |+-+---+-+-+-+    ||
718 ||  |a|bcd|e|f|i|  ||a|bcd|e|f|i|    ||
719 ||  +-+-+-+-+g+-+  |+-+-+-+-+g+-+    ||
720 ||  |j|m|nop|h|q|  ||j|m|nop|h|q|    ||
721 ||  |k+-+-+-+-+r|  ||k+-+-+-+-+r|    ||
722 ||  |l|t|w|xyz|s|  ||l|t|w|xyz|s|    ||
723 ||  +-+u+-+-+-+-+  |+-+u+-+-+-+-+    ||
724 ||  |A|v|B|E|FGH|  ||A|v|B|E|FGH|    ||
725 ||  +-+-+C+-+-+-+  |+-+-+C+-+-+-+    ||
726 ||  |IJK|D|L|O|P|  ||IJK|D|L|O|P|    ||
727 ||  +-+-+-+M+-+-+  |+-+-+-+M+-+-+    ||
728 ||  |Q|RST|N|U|V|  ||Q|RST|N|U|V|    ||
729 ||  +-+---+-+-+-+  |+-+---+-+-+-+    ||
730 |+-----------------+-----------------+|
731 ||+-+---+-+-+-+    |+-+-+-+-+-+-+-+-+||
732 |||a|bcd|e|f|i|    ||a|b|c|d|e|f|g|h|||
733 ||+-+-+-+-+g+-+    |+-+-+-+-+-+-+-+-+||
734 |||j|m|nop|h|q|    ||i|jkl|m|nop|q|t|||
735 |||k+-+-+-+-+r|    |+-+-+-+-+-+-+r+-+||
736 |||l|t|w|xyz|s|    ||u|v|wxy|z|A|s|D|||
737 ||+-+u+-+-+-+-+    |+-+-+-+-+-+B+-+-+||
738 |||A|v|B|E|FGH|    ||E|F|I|JKL|C|M|P|||
739 ||+-+-+C+-+-+-+    |+-+G+-+---+-+N+-+||
740 |||IJK|D|L|O|P|    ||Q|H|R|UVW|X|O|Y|||
741 ||+-+-+-+M+-+-+    |+-+-+S+-+-+-+-+-+||
742 |||Q|RST|N|U|V|    ||Z|0|T|3|456|7|8|||
743 ||+-+---+-+-+-+    |+-+1+-+-+-+-+-+-+||
744 ||                 ||9|2|abc|d|efg|h|||
745 ||                 |+-+-+-+-+-+-+-+-+||
746 ||                 ||i|j|k|l|m|n|o|p|||
747 ||                 |+-+-+-+-+-+-+-+-+||
748 |+-----------------+-----------------+|
749 +-------------------------------------+
750 ])
751 AT_CLEANUP
752 \f
753 AT_BANNER([output rendering -- horizontal page breaks])
754
755 AT_SETUP([breaking row of many small cells])
756 AT_KEYWORDS([render rendering])
757 AT_CAPTURE_FILE([input])
758 AT_DATA([input], [1 50
759 m4_for([x], [1], [50], [1], [@x
760 ])])
761 AT_CHECK([render-test input], [0], [dnl
762 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
763 |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|
764 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
765
766 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
767 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
768 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
769 ])
770 AT_CHECK([render-test input -o mb0 --min-break=0], [0], [dnl
771 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
772 |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|
773 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
774
775 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
776 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
777 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
778 ])
779 AT_CLEANUP
780
781 AT_SETUP([breaking row of many small cells, with headers])
782 AT_KEYWORDS([render rendering])
783 AT_CAPTURE_FILE([input])
784 AT_DATA([input], [1 54 2 2
785 @ha
786 @hb
787 m4_for([x], [1], [50], [1], [@x
788 ])dnl
789 @hc
790 @hd
791 ])
792 AT_CHECK([render-test input], [0], [dnl
793 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
794 |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|
795 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
796
797 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
798 |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|
799 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
800
801 +--+--+--+--+--+--+--+
802 |ha|hb|48|49|50|hc|hd|
803 +--+--+--+--+--+--+--+
804 ])
805 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
806 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
807 |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|
808 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
809
810 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
811 |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|
812 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
813
814 +--+--+--+--+--+--+--+
815 |ha|hb|48|49|50|hc|hd|
816 +--+--+--+--+--+--+--+
817 ])
818 AT_CLEANUP
819
820 AT_SETUP([breaking row of many medium-size cells])
821 AT_KEYWORDS([render rendering])
822 AT_CAPTURE_FILE([input])
823 AT_DATA([input], [1 50
824 m4_for([x], [1], [50], [1], [@cell x
825 ])])
826 AT_CHECK([render-test input], [0], [dnl
827 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
828 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
829 |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|  13|  14|  15|
830 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
831
832 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
833 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
834 |  16|  17|  18|  19|  20|  21|  22|  23|  24|  25|  26|  27|  28|  29|  30|
835 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
836
837 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
838 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
839 |  31|  32|  33|  34|  35|  36|  37|  38|  39|  40|  41|  42|  43|  44|  45|
840 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
841
842 +----+----+----+----+----+
843 |cell|cell|cell|cell|cell|
844 |  46|  47|  48|  49|  50|
845 +----+----+----+----+----+
846 ])
847 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
848 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
849 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cel
850 |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|  13|  14|  15|  1
851 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---
852
853 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
854 l|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce
855 6|  17|  18|  19|  20|  21|  22|  23|  24|  25|  26|  27|  28|  29|  30|  31|
856 -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--
857
858 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
859 ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|c
860 32|  33|  34|  35|  36|  37|  38|  39|  40|  41|  42|  43|  44|  45|  46|  47|
861 --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-
862
863 ---+----+----+
864 ell|cell|cell|
865  48|  49|  50|
866 ---+----+----+
867 ])
868 AT_CLEANUP
869
870 AT_SETUP([breaking row of many medium-size cells, with headers])
871 AT_KEYWORDS([render rendering])
872 AT_CAPTURE_FILE([input])
873 AT_DATA([input], [1 52 1 1
874 header1
875 m4_for([x], [1], [50], [1], [@cell x
876 ])dnl
877 header2
878 ])
879 AT_CHECK([render-test input], [0], [dnl
880        +----+----+----+----+----+----+----+----+----+----+----+----+
881 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
882        |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|
883        +----+----+----+----+----+----+----+----+----+----+----+----+
884
885        +----+----+----+----+----+----+----+----+----+----+----+----+
886 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
887        |  13|  14|  15|  16|  17|  18|  19|  20|  21|  22|  23|  24|
888        +----+----+----+----+----+----+----+----+----+----+----+----+
889
890        +----+----+----+----+----+----+----+----+----+----+----+----+
891 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
892        |  25|  26|  27|  28|  29|  30|  31|  32|  33|  34|  35|  36|
893        +----+----+----+----+----+----+----+----+----+----+----+----+
894
895        +----+----+----+----+----+----+----+----+----+----+----+----+
896 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
897        |  37|  38|  39|  40|  41|  42|  43|  44|  45|  46|  47|  48|
898        +----+----+----+----+----+----+----+----+----+----+----+----+
899
900        +----+----+
901 header1|cell|cell|header2
902        |  49|  50|
903        +----+----+
904 ])
905 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
906        +----+----+----+----+----+----+----+----+----+----+----+----+--+
907 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
908        |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|  |
909        +----+----+----+----+----+----+----+----+----+----+----+----+--+
910
911        +--+----+----+----+----+----+----+----+----+----+----+----+----+
912 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
913        |13|  14|  15|  16|  17|  18|  19|  20|  21|  22|  23|  24|  25|
914        +--+----+----+----+----+----+----+----+----+----+----+----+----+
915
916        +----+----+----+----+----+----+----+----+----+----+----+----+--+
917 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2
918        |  26|  27|  28|  29|  30|  31|  32|  33|  34|  35|  36|  37|  |
919        +----+----+----+----+----+----+----+----+----+----+----+----+--+
920
921        +--+----+----+----+----+----+----+----+----+----+----+----+----+
922 header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
923        |38|  39|  40|  41|  42|  43|  44|  45|  46|  47|  48|  49|  50|
924        +--+----+----+----+----+----+----+----+----+----+----+----+----+
925 ])
926 AT_CLEANUP
927
928 AT_SETUP([breaking row of many big narrow cells])
929 AT_KEYWORDS([render rendering])
930 AT_CAPTURE_FILE([input])
931 AT_DATA([input], [1 50
932 m4_for([x], [1], [50], [1], [@This is cell x in a series of 50.
933 ])])
934 AT_CHECK([render-test input], [0], [dnl
935 +------+------+------+------+------+------+------+------+------+------+------+
936 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
937 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
938 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9|  cell|  cell|
939 |  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a| 10 in| 11 in|
940 |series|series|series|series|series|series|series|series|series|     a|     a|
941 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|
942 |      |      |      |      |      |      |      |      |      |of 50.|of 50.|
943 +------+------+------+------+------+------+------+------+------+------+------+
944
945 +------+------+------+------+------+------+------+------+------+------+------+
946 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
947 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
948 |  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
949 | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in|
950 |     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
951 |series|series|series|series|series|series|series|series|series|series|series|
952 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
953 +------+------+------+------+------+------+------+------+------+------+------+
954
955 +------+------+------+------+------+------+------+------+------+------+------+
956 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
957 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
958 |  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
959 | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in|
960 |     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
961 |series|series|series|series|series|series|series|series|series|series|series|
962 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
963 +------+------+------+------+------+------+------+------+------+------+------+
964
965 +------+------+------+------+------+------+------+------+------+------+------+
966 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
967 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
968 |  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
969 | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in|
970 |     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
971 |series|series|series|series|series|series|series|series|series|series|series|
972 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
973 +------+------+------+------+------+------+------+------+------+------+------+
974
975 +------+------+------+------+------+------+
976 |  This|  This|  This|  This|  This|  This|
977 |    is|    is|    is|    is|    is|    is|
978 |  cell|  cell|  cell|  cell|  cell|  cell|
979 | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in|
980 |     a|     a|     a|     a|     a|     a|
981 |series|series|series|series|series|series|
982 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
983 +------+------+------+------+------+------+
984 ])
985 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
986 +------+------+------+------+------+------+------+------+------+------+------+-
987 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
988 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
989 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9|  cell|  cell|
990 |  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a| 10 in| 11 in|
991 |series|series|series|series|series|series|series|series|series|     a|     a|
992 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|s
993 |      |      |      |      |      |      |      |      |      |of 50.|of 50.|o
994 +------+------+------+------+------+------+------+------+------+------+------+-
995
996 -----+------+------+------+------+------+------+------+------+------+------+---
997  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  T
998    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
999  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  c
1000 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| 23
1001     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
1002 eries|series|series|series|series|series|series|series|series|series|series|ser
1003 f 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of
1004 -----+------+------+------+------+------+------+------+------+------+------+---
1005
1006 ---+------+------+------+------+------+------+------+------+------+------+-----
1007 his|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  Thi
1008  is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    i
1009 ell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cel
1010  in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| 34 i
1011   a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
1012 ies|series|series|series|series|series|series|series|series|series|series|serie
1013 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50
1014 ---+------+------+------+------+------+------+------+------+------+------+-----
1015
1016 -+------+------+------+------+------+------+------+------+------+------+------+
1017 s|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
1018 s|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
1019 l|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
1020 n| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| 45 in|
1021 a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
1022 s|series|series|series|series|series|series|series|series|series|series|series|
1023 .|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
1024 -+------+------+------+------+------+------+------+------+------+------+------+
1025
1026 +------+------+------+------+------+
1027 |  This|  This|  This|  This|  This|
1028 |    is|    is|    is|    is|    is|
1029 |  cell|  cell|  cell|  cell|  cell|
1030 | 46 in| 47 in| 48 in| 49 in| 50 in|
1031 |     a|     a|     a|     a|     a|
1032 |series|series|series|series|series|
1033 |of 50.|of 50.|of 50.|of 50.|of 50.|
1034 +------+------+------+------+------+
1035 ])
1036 AT_CLEANUP
1037
1038 AT_SETUP([breaking 2 rows of many small cells])
1039 AT_KEYWORDS([render rendering])
1040 AT_CAPTURE_FILE([input])
1041 AT_DATA([input], [2 50
1042 m4_for([x], [1], [100], [1], [@x
1043 ])])
1044 AT_CHECK([render-test input], [0], [dnl
1045 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1046 | 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|
1047 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1048 |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|
1049 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1050
1051 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
1052 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
1053 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
1054 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
1055 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
1056 ])
1057 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
1058 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1059 | 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|
1060 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1061 |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|
1062 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
1063
1064 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
1065 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
1066 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
1067 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
1068 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
1069 ])
1070 AT_CLEANUP
1071
1072 AT_SETUP([breaking 3 rows with many joined cells])
1073 AT_KEYWORDS([render rendering])
1074 AT_CAPTURE_FILE([input])
1075 AT_DATA([input], [3 49
1076 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
1077 A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var
1078 ])@1
1079 m4_for([x], [2], [49], [1], [1*2 @x
1080 ])@50
1081 ])
1082 AT_CHECK([render-test input], [0], [dnl
1083  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
1084 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1085 |1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
1086 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1087 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
1088 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
1089
1090  N O P Q R S T U V  W
1091 +---+---+---+---+----+
1092 | 21| 22| 23| 24|  25|
1093 +-+-+-+-+-+-+-+-+-+--+
1094 45| 46| 47| 48| 49|50|
1095 --+---+---+---+---+--+
1096 ])
1097 AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl
1098  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
1099 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1100 |1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
1101 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1102 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
1103 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
1104
1105  N O P Q R S T U V  W
1106 +---+---+---+---+----+
1107 | 21| 22| 23| 24|  25|
1108 +-+-+-+-+-+-+-+-+-+--+
1109 45| 46| 47| 48| 49|50|
1110 --+---+---+---+---+--+
1111 ])
1112 AT_CLEANUP
1113
1114 AT_SETUP([horz break 6x6, joined rows and columns])
1115 AT_KEYWORDS([render rendering])
1116 AT_DATA([input], [WEAVE_6X6])
1117 AT_DATA([expout], [dnl
1118 +-+--
1119 |a|bc
1120 +-+-+
1121 |j|m|
1122 |k+-+
1123 |l|t|
1124 +-+u|
1125 |A|v|
1126 +-+-+
1127 |IJK|
1128 +-+-+
1129 |Q|RS
1130 +-+--
1131
1132 --+-+
1133 cd|e|
1134 +-+-+
1135 |nop|
1136 +-+-+
1137 |w|xy
1138 +-+-+
1139 |B|E|
1140 |C+-+
1141 |D|L|
1142 +-+M|
1143 ST|N|
1144 --+-+
1145
1146 +-+-+
1147 |f|i|
1148 |g+-+
1149 |h|q|
1150 +-+r|
1151 yz|s|
1152 +-+-+
1153 |FGH|
1154 +-+-+
1155 |O|P|
1156 +-+-+
1157 |U|V|
1158 +-+-+
1159 ])
1160 AT_CHECK([render-test --width=6 input], [0], [expout])
1161 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
1162 AT_CLEANUP
1163
1164 AT_SETUP([horz break 6x6, joined rows and columns, left header])
1165 AT_KEYWORDS([render rendering])
1166 AT_DATA([input], [WEAVE_6X6([1 0 0 0])])
1167 AT_DATA([expout], [dnl
1168 +-+---+-+
1169 |a|bcd|e|
1170 +-+-+-+-+
1171 |j|m|nop|
1172 |k+-+-+-+
1173 |l|t|w|xy
1174 +-+u+-+-+
1175 |A|v|B|E|
1176 +-+-+C+-+
1177 |IJK|D|L|
1178 +-+-+-+M|
1179 |Q|RST|N|
1180 +-+---+-+
1181
1182 +-+-+-+
1183 |a|f|i|
1184 +-+g+-+
1185 |j|h|q|
1186 |k+-+r|
1187 |l|z|s|
1188 +-+-+-+
1189 |A|FGH|
1190 +-+-+-+
1191 |K|O|P|
1192 +-+-+-+
1193 |Q|U|V|
1194 +-+-+-+
1195 ])
1196 AT_CHECK([render-test --width=10 input], [0], [expout])
1197 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1198 AT_CLEANUP
1199
1200 AT_SETUP([horz break 6x6, joined rows and columns, right header])
1201 AT_KEYWORDS([render rendering])
1202 AT_DATA([input], [WEAVE_6X6([0 1 0 0])])
1203 AT_DATA([expout], [dnl
1204 +-+---+-+
1205 |a|bcd|i|
1206 +-+-+-+-+
1207 |j|m|n|q|
1208 |k+-+-+r|
1209 |l|t|w|s|
1210 +-+u+-+-+
1211 |A|v|B|H|
1212 +-+-+C+-+
1213 |IJK|D|P|
1214 +-+-+-+-+
1215 |Q|RST|V|
1216 +-+---+-+
1217
1218 +-+-+-+
1219 |e|f|i|
1220 +-+g+-+
1221 op|h|q|
1222 +-+-+r|
1223 |xyz|s|
1224 +-+-+-+
1225 |E|FGH|
1226 +-+-+-+
1227 |L|O|P|
1228 |M+-+-+
1229 |N|U|V|
1230 +-+-+-+
1231 ])
1232 AT_CHECK([render-test --width=10 input], [0], [expout])
1233 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout])
1234 AT_CLEANUP
1235
1236 AT_SETUP([breaking joined cells too wide for page])
1237 AT_KEYWORDS([render rendering])
1238 AT_DATA([input], [4 6
1239 1*6 @abc def ghi jkl
1240 1*3 @mno pqr
1241 1*3 @stu vwx
1242 1*2 @yzA
1243 1*2 @BCD
1244 1*2 @EFG
1245 @H
1246 @I
1247 @J
1248 @K
1249 @L
1250 @M
1251 ])
1252 AT_CHECK([render-test --width=10 input], [0], [dnl
1253 +--------
1254 |abc def
1255 |
1256 +-----+--
1257 |  mno|
1258 |  pqr|
1259 +---+-+-+
1260 |yzA|BCD|
1261 +-+-+-+-+
1262 |H|I|J|K|
1263 +-+-+-+-+
1264
1265 ----+
1266  ghi|
1267  jkl|
1268 ----+
1269  stu|
1270  vwx|
1271 +---+
1272 |EFG|
1273 +-+-+
1274 |L|M|
1275 +-+-+
1276 ])
1277 AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [dnl
1278 +--------
1279 |abc def
1280 |
1281 +-----+--
1282 |  mno|
1283 |  pqr|
1284 +---+-+-+
1285 |yzA|BCD|
1286 +-+-+-+-+
1287 |H|I|J|K|
1288 +-+-+-+-+
1289
1290 ----+
1291  ghi|
1292  jkl|
1293 ----+
1294  stu|
1295  vwx|
1296 +---+
1297 |EFG|
1298 +-+-+
1299 |L|M|
1300 +-+-+
1301 ])
1302 AT_CLEANUP
1303
1304 AT_SETUP([breaking joined cells much too wide for page])
1305 AT_KEYWORDS([render rendering])
1306 AT_DATA([input], [4 6
1307 1*6 @abc def ghi jkl
1308 1*3 @mno pqr
1309 1*3 @stu vwx
1310 1*2 @yzA
1311 1*2 @BCD
1312 1*2 @EFG
1313 @H
1314 @I
1315 @J
1316 @K
1317 @L
1318 @M
1319 ])
1320 AT_CHECK([render-test --width=6 input], [0], [dnl
1321 +----
1322 |abc
1323 |
1324 +----
1325 |  mn
1326 |  pq
1327 +---+
1328 |yzA|
1329 +-+-+
1330 |H|I|
1331 +-+-+
1332
1333 -----
1334  def
1335
1336 --+--
1337 no|
1338 qr|
1339 +-+-+
1340 |BCD|
1341 +-+-+
1342 |J|K|
1343 +-+-+
1344
1345 ----+
1346  ghi|
1347  jkl|
1348 ----+
1349  stu|
1350  vwx|
1351 +---+
1352 |EFG|
1353 +-+-+
1354 |L|M|
1355 +-+-+
1356 ])
1357 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1358 +----
1359 |abc
1360 |
1361 +----
1362 |  mn
1363 |  pq
1364 +---+
1365 |yzA|
1366 +-+-+
1367 |H|I|
1368 +-+-+
1369
1370 -----
1371  def
1372
1373 --+--
1374 no|
1375 qr|
1376 +-+-+
1377 |BCD|
1378 +-+-+
1379 |J|K|
1380 +-+-+
1381
1382 ----+
1383  ghi|
1384  jkl|
1385 ----+
1386  stu|
1387  vwx|
1388 +---+
1389 |EFG|
1390 +-+-+
1391 |L|M|
1392 +-+-+
1393 ])
1394 AT_CLEANUP
1395
1396 AT_SETUP([breaking cell too wide for page, no border])
1397 AT_KEYWORDS([render rendering])
1398 AT_CAPTURE_FILE([input])
1399 AT_DATA([input], [1 1
1400 abcdefghijklmnopqrstuvwxyz
1401 ])
1402 AT_CHECK([render-test --width=6 input], [0], [dnl
1403 abcdef
1404
1405 ghijkl
1406
1407 mnopqr
1408
1409 stuvwx
1410
1411 yz
1412 ])
1413 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl
1414 abcdef
1415
1416 ghijkl
1417
1418 mnopqr
1419
1420 stuvwx
1421
1422 yz
1423 ])
1424 AT_CLEANUP
1425
1426 AT_SETUP([breaking cell too wide for page, with border])
1427 AT_KEYWORDS([render rendering])
1428 AT_CAPTURE_FILE([input])
1429 AT_DATA([input], [1 1
1430 @abcdefghijklmnopqrstuvwxyz
1431 ])
1432 AT_DATA([expout], [dnl
1433 +-----
1434 |abcde
1435 +-----
1436
1437 ------
1438 fghijk
1439 ------
1440
1441 ------
1442 lmnopq
1443 ------
1444
1445 ------
1446 rstuvw
1447 ------
1448
1449 ---+
1450 xyz|
1451 ---+
1452 ])
1453 AT_CHECK([render-test --width=6 input], [0], [expout])
1454 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout])
1455 AT_CLEANUP
1456
1457 AT_SETUP([horz break 8x8 with many 2x2 joins])
1458 AT_KEYWORDS([render rendering])
1459 AT_DATA([input], [WEAVE_8X8_2])
1460 AT_CHECK([render-test --width=8 input], [0],[dnl
1461 +---+--
1462 |abc|jk
1463 |def|  
1464 |ghi+--
1465 |   |yz
1466 +-+-+BC
1467 |Q|V|EF
1468 |R| |  
1469 |S+-+-+
1470 |T|012|
1471 |U|345|
1472 | |678|
1473 | |   |
1474 +-+-+-+
1475 |xyz|G|
1476 |ABC|H|
1477 |DEF|I|
1478 |   | |
1479 +---+-+
1480 |abcde|
1481 |     |
1482 +-----+
1483
1484 --+----+
1485 kl| mno|
1486   | pqr|
1487 --+ stu|
1488 zA|    |
1489 CD+-+--+
1490 FG|W| Z|
1491   |X|  |
1492 +-+Y+--+
1493 |9| | ab
1494 | | | de
1495 +-+-+ gh
1496 |opq|   
1497 |rst+---
1498 |uvw| JK
1499 |   |   
1500 +---+--+
1501 | MNOPQ|
1502 | RSTUV|
1503 | WXYZ0|
1504 |      |
1505 +------+
1506
1507 +----+
1508 | vwx|
1509 |    |
1510 +----+
1511 | HIJ|
1512 | KLM|
1513 | NOP|
1514 |    |
1515 +-+--+
1516 bc| j|
1517 ef| k|
1518 hi| l|
1519   | m|
1520 --+ n|
1521 KL|  |
1522   |  |
1523 +-+--+
1524 | 123|
1525 | 456|
1526
1527 | 456|
1528 | 789|
1529 |    |
1530 +----+
1531 ])
1532 AT_CHECK([render-test -o mb0 --min-break=0 --width=8 input], [0],[dnl
1533 +---+--
1534 |abc|jk
1535 |def|  
1536 |ghi+--
1537 |   |yz
1538 +-+-+BC
1539 |Q|V|EF
1540 |R| |  
1541 |S+-+-+
1542 |T|012|
1543 |U|345|
1544 | |678|
1545 | |   |
1546 +-+-+-+
1547 |xyz|G|
1548 |ABC|H|
1549 |DEF|I|
1550 |   | |
1551 +---+-+
1552 |abcde|
1553 |     |
1554 +-----+
1555
1556 --+----+
1557 kl| mno|
1558   | pqr|
1559 --+ stu|
1560 zA|    |
1561 CD+-+--+
1562 FG|W| Z|
1563   |X|  |
1564 +-+Y+--+
1565 |9| | ab
1566 | | | de
1567 +-+-+ gh
1568 |opq|   
1569 |rst+---
1570 |uvw| JK
1571 |   |   
1572 +---+--+
1573 | MNOPQ|
1574 | RSTUV|
1575 | WXYZ0|
1576 |      |
1577 +------+
1578
1579 +----+
1580 | vwx|
1581 |    |
1582 +----+
1583 | HIJ|
1584 | KLM|
1585 | NOP|
1586 |    |
1587 +-+--+
1588 bc| j|
1589 ef| k|
1590 hi| l|
1591   | m|
1592 --+ n|
1593 KL|  |
1594   |  |
1595 +-+--+
1596 | 123|
1597 | 456|
1598 | 789|
1599
1600 |    |
1601 +----+
1602 ])
1603 AT_CLEANUP
1604 \f
1605 AT_BANNER([output rendering -- vertical page breaks])
1606
1607 AT_SETUP([breaking column of many small cells])
1608 AT_KEYWORDS([render rendering])
1609 AT_CAPTURE_FILE([input])
1610 AT_DATA([input], [20 1
1611 m4_for([x], [1], [20], [1], [@x
1612 ])])
1613 AT_CHECK([render-test --length=10 input], [0], [dnl
1614 +--+
1615 | 1|
1616 +--+
1617 | 2|
1618 +--+
1619 | 3|
1620 +--+
1621 | 4|
1622 +--+
1623
1624 +--+
1625 | 5|
1626 +--+
1627 | 6|
1628 +--+
1629 | 7|
1630 +--+
1631 | 8|
1632 +--+
1633
1634 +--+
1635 | 9|
1636 +--+
1637 |10|
1638 +--+
1639 |11|
1640 +--+
1641 |12|
1642 +--+
1643
1644 +--+
1645 |13|
1646 +--+
1647 |14|
1648 +--+
1649 |15|
1650 +--+
1651 |16|
1652 +--+
1653
1654 +--+
1655 |17|
1656 +--+
1657 |18|
1658 +--+
1659 |19|
1660 +--+
1661 |20|
1662 +--+
1663 ])
1664 AT_CHECK([render-test -o mb0 --min-break=0 --length=10 input], [0], [dnl
1665 +--+
1666 | 1|
1667 +--+
1668 | 2|
1669 +--+
1670 | 3|
1671 +--+
1672 | 4|
1673 +--+
1674
1675 +--+
1676 | 5|
1677 +--+
1678 | 6|
1679 +--+
1680 | 7|
1681 +--+
1682 | 8|
1683 +--+
1684
1685 +--+
1686 | 9|
1687 +--+
1688 |10|
1689 +--+
1690 |11|
1691 +--+
1692 |12|
1693 +--+
1694
1695 +--+
1696 |13|
1697 +--+
1698 |14|
1699 +--+
1700 |15|
1701 +--+
1702 |16|
1703 +--+
1704
1705 +--+
1706 |17|
1707 +--+
1708 |18|
1709 +--+
1710 |19|
1711 +--+
1712 |20|
1713 +--+
1714 ])
1715 AT_CLEANUP
1716
1717 AT_SETUP([breaking column of many small cells, with headers])
1718 AT_KEYWORDS([render rendering])
1719 AT_CAPTURE_FILE([input])
1720 AT_DATA([input], [17 1 0 0 1 1
1721 @a
1722 m4_for([x], [1], [15], [1], [@x
1723 ])@b
1724 ])
1725 AT_CHECK([render-test --length=13 input], [0], [dnl
1726 +--+
1727 | a|
1728 +--+
1729 | 1|
1730 +--+
1731 | 2|
1732 +--+
1733 | 3|
1734 +--+
1735 | 4|
1736 +--+
1737 | b|
1738 +--+
1739
1740 +--+
1741 | a|
1742 +--+
1743 | 5|
1744 +--+
1745 | 6|
1746 +--+
1747 | 7|
1748 +--+
1749 | 8|
1750 +--+
1751 | b|
1752 +--+
1753
1754 +--+
1755 | a|
1756 +--+
1757 | 9|
1758 +--+
1759 |10|
1760 +--+
1761 |11|
1762 +--+
1763 |12|
1764 +--+
1765 | b|
1766 +--+
1767
1768 +--+
1769 | a|
1770 +--+
1771 |13|
1772 +--+
1773 |14|
1774 +--+
1775 |15|
1776 +--+
1777 | b|
1778 +--+
1779 ])
1780 AT_CHECK([render-test -o mb0 --min-break=0 --length=13 input], [0], [dnl
1781 +--+
1782 | a|
1783 +--+
1784 | 1|
1785 +--+
1786 | 2|
1787 +--+
1788 | 3|
1789 +--+
1790 | 4|
1791 +--+
1792 | b|
1793 +--+
1794
1795 +--+
1796 | a|
1797 +--+
1798 | 5|
1799 +--+
1800 | 6|
1801 +--+
1802 | 7|
1803 +--+
1804 | 8|
1805 +--+
1806 | b|
1807 +--+
1808
1809 +--+
1810 | a|
1811 +--+
1812 | 9|
1813 +--+
1814 |10|
1815 +--+
1816 |11|
1817 +--+
1818 |12|
1819 +--+
1820 | b|
1821 +--+
1822
1823 +--+
1824 | a|
1825 +--+
1826 |13|
1827 +--+
1828 |14|
1829 +--+
1830 |15|
1831 +--+
1832 | b|
1833 +--+
1834 ])
1835 AT_CLEANUP
1836
1837 AT_SETUP([disabling too-big headers])
1838 AT_KEYWORDS([render rendering])
1839 AT_CAPTURE_FILE([input])
1840 AT_DATA([input], [17 1 0 0 1 1
1841 @a
1842 m4_for([x], [1], [15], [1], [@x
1843 ])@b
1844 ])
1845 AT_DATA([expout], [dnl
1846 +--+
1847 | a|
1848 +--+
1849 | 1|
1850 +--+
1851 | 2|
1852 +--+
1853 | 3|
1854 +--+
1855
1856 +--+
1857 | 4|
1858 +--+
1859 | 5|
1860 +--+
1861 | 6|
1862 +--+
1863 | 7|
1864 +--+
1865
1866 +--+
1867 | 8|
1868 +--+
1869 | 9|
1870 +--+
1871 |10|
1872 +--+
1873 |11|
1874 +--+
1875
1876 +--+
1877 |12|
1878 +--+
1879 |13|
1880 +--+
1881 |14|
1882 +--+
1883 |15|
1884 +--+
1885
1886 +--+
1887 | b|
1888 +--+
1889 ])
1890 AT_CHECK([render-test --length=10 input], [0], [expout])
1891 AT_CHECK([render-test -o mb0 --min-break=0 --length=10 input], [0], [expout])
1892 AT_CLEANUP
1893
1894 AT_SETUP([breaking column of many medium-size cells])
1895 AT_KEYWORDS([render rendering])
1896 AT_CAPTURE_FILE([input])
1897 AT_DATA([input], [20 1
1898 m4_for([x], [1], [20], [1], [@top x\ncell x\nbottom x
1899 ])])
1900 AT_CHECK([render-test --length 10 input], [0], [dnl
1901 +---------+
1902 |    top 1|
1903 |   cell 1|
1904 | bottom 1|
1905 +---------+
1906 |    top 2|
1907 |   cell 2|
1908 | bottom 2|
1909 +---------+
1910
1911 +---------+
1912 |    top 3|
1913 |   cell 3|
1914 | bottom 3|
1915 +---------+
1916 |    top 4|
1917 |   cell 4|
1918 | bottom 4|
1919 +---------+
1920
1921 +---------+
1922 |    top 5|
1923 |   cell 5|
1924 | bottom 5|
1925 +---------+
1926 |    top 6|
1927 |   cell 6|
1928 | bottom 6|
1929 +---------+
1930
1931 +---------+
1932 |    top 7|
1933 |   cell 7|
1934 | bottom 7|
1935 +---------+
1936 |    top 8|
1937 |   cell 8|
1938 | bottom 8|
1939 +---------+
1940
1941 +---------+
1942 |    top 9|
1943 |   cell 9|
1944 | bottom 9|
1945 +---------+
1946 |   top 10|
1947 |  cell 10|
1948 |bottom 10|
1949 +---------+
1950
1951 +---------+
1952 |   top 11|
1953 |  cell 11|
1954 |bottom 11|
1955 +---------+
1956 |   top 12|
1957 |  cell 12|
1958 |bottom 12|
1959 +---------+
1960
1961 +---------+
1962 |   top 13|
1963 |  cell 13|
1964 |bottom 13|
1965 +---------+
1966 |   top 14|
1967 |  cell 14|
1968 |bottom 14|
1969 +---------+
1970
1971 +---------+
1972 |   top 15|
1973 |  cell 15|
1974 |bottom 15|
1975 +---------+
1976 |   top 16|
1977 |  cell 16|
1978 |bottom 16|
1979 +---------+
1980
1981 +---------+
1982 |   top 17|
1983 |  cell 17|
1984 |bottom 17|
1985 +---------+
1986 |   top 18|
1987 |  cell 18|
1988 |bottom 18|
1989 +---------+
1990
1991 +---------+
1992 |   top 19|
1993 |  cell 19|
1994 |bottom 19|
1995 +---------+
1996 |   top 20|
1997 |  cell 20|
1998 |bottom 20|
1999 +---------+
2000 ])
2001 AT_CHECK([render-test -o mb0 --min-break=0 --length 10 input], [0], [dnl
2002 +---------+
2003 |    top 1|
2004 |   cell 1|
2005 | bottom 1|
2006 +---------+
2007 |    top 2|
2008 |   cell 2|
2009 | bottom 2|
2010 +---------+
2011 |    top 3|
2012
2013 |   cell 3|
2014 | bottom 3|
2015 +---------+
2016 |    top 4|
2017 |   cell 4|
2018 | bottom 4|
2019 +---------+
2020 |    top 5|
2021 |   cell 5|
2022
2023 | bottom 5|
2024 +---------+
2025 |    top 6|
2026 |   cell 6|
2027 | bottom 6|
2028 +---------+
2029 |    top 7|
2030 |   cell 7|
2031 | bottom 7|
2032 +---------+
2033
2034 +---------+
2035 |    top 8|
2036 |   cell 8|
2037 | bottom 8|
2038 +---------+
2039 |    top 9|
2040 |   cell 9|
2041 | bottom 9|
2042 +---------+
2043 |   top 10|
2044
2045 |  cell 10|
2046 |bottom 10|
2047 +---------+
2048 |   top 11|
2049 |  cell 11|
2050 |bottom 11|
2051 +---------+
2052 |   top 12|
2053 |  cell 12|
2054
2055 |bottom 12|
2056 +---------+
2057 |   top 13|
2058 |  cell 13|
2059 |bottom 13|
2060 +---------+
2061 |   top 14|
2062 |  cell 14|
2063 |bottom 14|
2064 +---------+
2065
2066 +---------+
2067 |   top 15|
2068 |  cell 15|
2069 |bottom 15|
2070 +---------+
2071 |   top 16|
2072 |  cell 16|
2073 |bottom 16|
2074 +---------+
2075 |   top 17|
2076
2077 |  cell 17|
2078 |bottom 17|
2079 +---------+
2080 |   top 18|
2081 |  cell 18|
2082 |bottom 18|
2083 +---------+
2084 |   top 19|
2085 |  cell 19|
2086
2087 |bottom 19|
2088 +---------+
2089 |   top 20|
2090 |  cell 20|
2091 |bottom 20|
2092 +---------+
2093 ])
2094 AT_CLEANUP
2095
2096 AT_SETUP([breaking 3 columns with many joined cells])
2097 AT_KEYWORDS([render rendering])
2098 AT_CAPTURE_FILE([input])
2099 #  +--+--+
2100 # a| 1|11|
2101 #  +--+ab|
2102 # b| 2|cd|
2103 #  |ab+--+
2104 # c|cd|12|
2105 #  +--+ab|
2106 # d| 3|cd|
2107 #  |ab+--+
2108 # e|cd|13|
2109 #  +--+ab|
2110 # f| 4|cd|
2111 #  |ab+--+
2112 # g|cd|14|
2113 #  +--+ab|
2114 # h| 5|cd|
2115 #  |ab+--+
2116 # i|cd|15|
2117 #  +--+ab|
2118 # j| 6|cd|
2119 #  |ab+--+
2120 # k|cd|16|
2121 #  +--+ab|
2122 # l| 7|cd|
2123 #  |ab+--+
2124 # m|cd|17|
2125 #  +--+ab|
2126 # n| 8|cd|
2127 #  |ab+--+
2128 # o|cd|18|
2129 #  +--+ab|
2130 # p| 9|cd|
2131 #  |ab+--+
2132 # q|cd|19|
2133 #  +--+ab|
2134 # r|10|cd|
2135 #  |ab+--+
2136 # s|cd|20|
2137 #  +--+--+
2138 AT_DATA([input], [3 19
2139 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
2140 ])@1
2141 m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
2142 ])@20
2143 ])
2144 AT_DATA([expout], [dnl
2145  +--+--+
2146 a| 1|11|
2147  +--+ab|
2148 b| 2|cd|
2149  |ab+--+
2150
2151  |ab+--+
2152 c|cd|12|
2153  +--+ab|
2154 d| 3|cd|
2155  |ab+--+
2156
2157  |ab+--+
2158 e|cd|13|
2159  +--+ab|
2160 f| 4|cd|
2161  |ab+--+
2162
2163  |ab+--+
2164 g|cd|14|
2165  +--+ab|
2166 h| 5|cd|
2167  |ab+--+
2168
2169  |ab+--+
2170 i|cd|15|
2171  +--+ab|
2172 j| 6|cd|
2173  |ab+--+
2174
2175  |ab+--+
2176 k|cd|16|
2177  +--+ab|
2178 l| 7|cd|
2179  |ab+--+
2180
2181  |ab+--+
2182 m|cd|17|
2183  +--+ab|
2184 n| 8|cd|
2185  |ab+--+
2186
2187  |ab+--+
2188 o|cd|18|
2189  +--+ab|
2190 p| 9|cd|
2191  |ab+--+
2192
2193  |ab+--+
2194 q|cd|19|
2195  +--+ab|
2196 r|10|cd|
2197  |ab+--+
2198
2199  |ab+--+
2200 s|cd|20|
2201  +--+--+
2202 ])
2203 AT_CHECK([render-test --length=6 --transpose input], [0], [expout])
2204 AT_CHECK([render-test -o mb0 --min-break=0 --length=6 --transpose input],
2205   [0], [expout])
2206 AT_CLEANUP
2207
2208 AT_SETUP([vert break 6x6, joined rows and columns])
2209 AT_KEYWORDS([render rendering])
2210 AT_DATA([input], [WEAVE_6X6])
2211 AT_CHECK([render-test --length=6 input], [0], [dnl
2212 +-+---+-+-+-+
2213 |a|bcd|e|f|i|
2214 +-+-+-+-+g+-+
2215 |j|m|nop|h|q|
2216 |k+-+---+-+r|
2217
2218 |k+-+-+---+r|
2219 |l|t|w|xyz|s|
2220 +-+u+-+-+-+-+
2221 |A|v|B|E|FGH|
2222 +-+-+C+-+---+
2223
2224 +---+C+-+-+-+
2225 |IJK|D|L|O|P|
2226 +-+-+-+M+-+-+
2227 |Q|RST|N|U|V|
2228 +-+---+-+-+-+
2229 ])
2230 AT_CHECK([render-test -o mb0 --min-break=0 --length=6 input], [0], [dnl
2231 +-+---+-+-+-+
2232 |a|bcd|e|f|i|
2233 +-+-+-+-+g+-+
2234 |j|m|nop|h|q|
2235 |k+-+---+-+r|
2236
2237 |k+-+-+---+r|
2238 |l|t|w|xyz|s|
2239 +-+u+-+-+-+-+
2240 |A|v|B|E|FGH|
2241 +-+-+C+-+---+
2242
2243 +---+C+-+-+-+
2244 |IJK|D|L|O|P|
2245 +-+-+-+M+-+-+
2246 |Q|RST|N|U|V|
2247 +-+---+-+-+-+
2248 ])
2249 AT_CLEANUP
2250
2251 AT_SETUP([breaking joined cells too tall for page])
2252 AT_KEYWORDS([render rendering])
2253 AT_DATA([input], [4 6
2254 1*6 @abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyzA\nBCD\nEFG
2255 1*3 @HIJ\nKLM\nOPQ\nRST\nUVW
2256 1*3 @XYZ\n012\n345\n678\n90a
2257 1*2 @bcd\nefg\nhij
2258 1*2 @klm\nnop\nqrs
2259 1*2 @tuv\nwxy\nzAB
2260 @C
2261 @D
2262 @E
2263 @F
2264 @G
2265 @H
2266 ])
2267 AT_CHECK([render-test --transpose --length=6 input], [0], [dnl
2268 +---+---+---+-+
2269 |abc|HIJ|bcd|C|
2270 |def|KLM|efg+-+
2271 |ghi|OPQ|hij|D|
2272 |jkl|RST+---+-+
2273
2274 |jkl|RST+---+-+
2275 |mno|UVW|klm|E|
2276 |pqr+---+nop+-+
2277 |stu|XYZ|qrs|F|
2278 |vwx|012+---+-+
2279
2280 |vwx|012+---+-+
2281 |yzA|345|tuv|G|
2282 |BCD|678|wxy+-+
2283 |EFG|90a|zAB|H|
2284 +---+---+---+-+
2285 ])
2286 AT_CHECK([render-test -o mb0 --min-break=0 --transpose --length=6 input], [0], [dnl
2287 +---+---+---+-+
2288 |abc|HIJ|bcd|C|
2289 |def|KLM|efg+-+
2290 |ghi|OPQ|hij|D|
2291 |jkl|RST+---+-+
2292
2293 |jkl|RST+---+-+
2294 |mno|UVW|klm|E|
2295 |pqr+---+nop+-+
2296 |stu|XYZ|qrs|F|
2297 |vwx|012+---+-+
2298
2299 |vwx|012+---+-+
2300 |yzA|345|tuv|G|
2301 |BCD|678|wxy+-+
2302 |EFG|90a|zAB|H|
2303 +---+---+---+-+
2304 ])
2305 AT_CLEANUP
2306
2307 AT_SETUP([breaking cell too tall for page, no border])
2308 AT_KEYWORDS([render rendering])
2309 AT_CAPTURE_FILE([input])
2310 AT_DATA([input], [1 1
2311 abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ
2312 ])
2313 AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl
2314    abc
2315   defg
2316    hij
2317   klmn
2318    opq
2319   rstu
2320
2321 vwx yz
2322  ABCDE
2323  FGH I
2324     JK
2325  LMNOP
2326 QR STU
2327
2328  VWXYZ
2329 ])
2330 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 --length=6 input], [0], [dnl
2331    abc
2332   defg
2333    hij
2334   klmn
2335    opq
2336   rstu
2337
2338 vwx yz
2339  ABCDE
2340  FGH I
2341     JK
2342  LMNOP
2343 QR STU
2344
2345  VWXYZ
2346 ])
2347 AT_CLEANUP
2348
2349 AT_SETUP([breaking cell too tall for page, with border])
2350 AT_KEYWORDS([render rendering])
2351 AT_CAPTURE_FILE([input])
2352 AT_DATA([input], [1 1
2353 @abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ
2354 ])
2355 AT_DATA([expout], [dnl
2356 +-----+
2357 |  abc|
2358 | defg|
2359 |  hij|
2360 | klmn|
2361 |  opq|
2362
2363 | rstu|
2364 |  vwx|
2365 |   yz|
2366 |ABCDE|
2367 |FGH I|
2368 |   JK|
2369
2370 |LMNOP|
2371 |   QR|
2372 |  STU|
2373 |VWXYZ|
2374 +-----+
2375 ])
2376 AT_CHECK([render-test --width=7 --length=6 input], [0], [expout])
2377 AT_CHECK([render-test -o mb0 --min-break=0 --width=7 --length=6 input],
2378   [0], [expout])
2379 AT_CLEANUP
2380
2381 AT_SETUP([breaking nested cell too tall for page])
2382 AT_KEYWORDS([render rendering])
2383 AT_CAPTURE_FILE([input])
2384 AT_DATA([input], [WEAVE_8X8[]WEAVE_6X6[]dnl
2385 1 2
2386 @{0}
2387 @{1}
2388 ])
2389 AT_CHECK([render-test input --length=10], [0], [dnl
2390 +-----------------+-------------+
2391 |+-+-+-+-+-+-+-+-+|+-+---+-+-+-+|
2392 ||a|b|c|d|e|f|g|h|||a|bcd|e|f|i||
2393 |+-+-+-+-+-+-+-+-+|+-+-+-+-+g+-+|
2394 ||i|jkl|m|nop|q|t|||j|m|nop|h|q||
2395 |+-+-+-+-+-+-+r+-+||k+-+-+-+-+r||
2396 ||u|v|wxy|z|A|s|D|||l|t|w|xyz|s||
2397 |+-+-+-+-+-+B+-+-+|+-+u+-+-+-+-+|
2398 ||E|F|I|JKL|C|M|P|||A|v|B|E|FGH||
2399 |+-+G+-+---+-+N+-+|+-+-+C+-+-+-+|
2400
2401 ||Q|H|R|UVW|X|O|Y|||IJK|D|L|O|P||
2402 |+-+-+S+-+-+-+-+-+|+-+-+-+M+-+-+|
2403 ||Z|0|T|3|456|7|8|||Q|RST|N|U|V||
2404 |+-+1+-+-+-+-+-+-+|+-+---+-+-+-+|
2405 ||9|2|abc|d|efg|h||             |
2406 |+-+-+-+-+-+-+-+-+|             |
2407 ||i|j|k|l|m|n|o|p||             |
2408 |+-+-+-+-+-+-+-+-+|             |
2409 +-----------------+-------------+
2410 ])
2411 AT_CLEANUP
2412 \f
2413 AT_BANNER([output rendering -- double page breaks])
2414
2415 AT_SETUP([double break 6x6, joined rows and columns])
2416 AT_KEYWORDS([render rendering])
2417 AT_DATA([input], [WEAVE_6X6])
2418 AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl
2419 +-+--
2420 |a|bc
2421 +-+-+
2422 |j|m|
2423 |k+-+
2424
2425 |k+-+
2426 |l|t|
2427 +-+u|
2428 |A|v|
2429 +-+-+
2430
2431 +---+
2432 |IJK|
2433 +-+-+
2434 |Q|RS
2435 +-+--
2436
2437 --+-+
2438 cd|e|
2439 +-+-+
2440 |nop|
2441 +---+
2442
2443 +-+--
2444 |w|xy
2445 +-+-+
2446 |B|E|
2447 |C+-+
2448
2449 |C+-+
2450 |D|L|
2451 +-+M|
2452 ST|N|
2453 --+-+
2454
2455 +-+-+
2456 |f|i|
2457 |g+-+
2458 |h|q|
2459 +-+r|
2460
2461 --+r|
2462 yz|s|
2463 +-+-+
2464 |FGH|
2465 +---+
2466
2467 +-+-+
2468 |O|P|
2469 +-+-+
2470 |U|V|
2471 +-+-+
2472 ])
2473 AT_CHECK([render-test -o mb0 --min-break=0 --width=6 --length=6 input], [0], [dnl
2474 +-+--
2475 |a|bc
2476 +-+-+
2477 |j|m|
2478 |k+-+
2479
2480 |k+-+
2481 |l|t|
2482 +-+u|
2483 |A|v|
2484 +-+-+
2485
2486 +---+
2487 |IJK|
2488 +-+-+
2489 |Q|RS
2490 +-+--
2491
2492 --+-+
2493 cd|e|
2494 +-+-+
2495 |nop|
2496 +---+
2497
2498 +-+--
2499 |w|xy
2500 +-+-+
2501 |B|E|
2502 |C+-+
2503
2504 |C+-+
2505 |D|L|
2506 +-+M|
2507 ST|N|
2508 --+-+
2509
2510 +-+-+
2511 |f|i|
2512 |g+-+
2513 |h|q|
2514 +-+r|
2515
2516 --+r|
2517 yz|s|
2518 +-+-+
2519 |FGH|
2520 +---+
2521
2522 +-+-+
2523 |O|P|
2524 +-+-+
2525 |U|V|
2526 +-+-+
2527 ])
2528 AT_CLEANUP
2529
2530 AT_SETUP([double break 8x8, with joins, left and right headers])
2531 AT_KEYWORDS([render rendering])
2532 AT_DATA([input], [WEAVE_8X8([1 1 0 0])])
2533 AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
2534 +-+-+-+-+-+-+
2535 |a|b|c|d|e|h|
2536 +-+-+-+-+-+-+
2537 |i|jkl|m|n|t|
2538 +-+-+-+-+-+-+
2539 |u|v|wxy|z|D|
2540 +-+-+-+-+-+-+
2541 |E|F|I|JKL|P|
2542 +-+G+-+---+-+
2543 |Q|H|R|UVW|Y|
2544 +-+-+S+-+-+-+
2545 |Z|0|T|3|4|8|
2546 +-+1+-+-+-+-+
2547
2548 +-+1+---+-+-+
2549 |9|2|abc|d|h|
2550 +-+-+-+-+-+-+
2551 |i|j|k|l|m|p|
2552 +-+-+-+-+-+-+
2553
2554 +-+--+-+-+
2555 |a| f|g|h|
2556 +-+--+-+-+
2557 |i|op|q|t|
2558 +-+--+r+-+
2559 |u| A|s|D|
2560 +-+ B+-+-+
2561
2562 +-+ B+-+-+
2563 |E| C|M|P|
2564 +-+--+N+-+
2565 |Q| X|O|Y|
2566 +-+--+-+-+
2567 |Z|56|7|8|
2568 +-+--+-+-+
2569 |9| efg|h|
2570 +-+--+-+-+
2571 |i| n|o|p|
2572 +-+--+-+-+
2573 ])
2574 AT_CHECK([render-test -o mb0 --min-break=0 input --width=14 --length=14], [0], [dnl
2575 +-+-+-+-+-+-+
2576 |a|b|c|d|e|h|
2577 +-+-+-+-+-+-+
2578 |i|jkl|m|n|t|
2579 +-+-+-+-+-+-+
2580 |u|v|wxy|z|D|
2581 +-+-+-+-+-+-+
2582 |E|F|I|JKL|P|
2583 +-+G+-+---+-+
2584 |Q|H|R|UVW|Y|
2585 +-+-+S+-+-+-+
2586 |Z|0|T|3|4|8|
2587 +-+1+-+-+-+-+
2588
2589 +-+1+---+-+-+
2590 |9|2|abc|d|h|
2591 +-+-+-+-+-+-+
2592 |i|j|k|l|m|p|
2593 +-+-+-+-+-+-+
2594
2595 +-+--+-+-+
2596 |a| f|g|h|
2597 +-+--+-+-+
2598 |i|op|q|t|
2599 +-+--+r+-+
2600 |u| A|s|D|
2601 +-+ B+-+-+
2602
2603 +-+ B+-+-+
2604 |E| C|M|P|
2605 +-+--+N+-+
2606 |Q| X|O|Y|
2607 +-+--+-+-+
2608 |Z|56|7|8|
2609 +-+--+-+-+
2610 |9| efg|h|
2611 +-+--+-+-+
2612 |i| n|o|p|
2613 +-+--+-+-+
2614 ])
2615 AT_CLEANUP
2616
2617 AT_SETUP([double break 8x8, with joins, top and bottom headers])
2618 AT_KEYWORDS([render rendering])
2619 AT_DATA([input], [WEAVE_8X8([0 0 1 1])])
2620 AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
2621 +-+-+-+-+-+-+
2622 |a|b|c|d|e|f|
2623 +-+-+-+-+-+-+
2624 |i|jkl|m|nop|
2625 +-+-+-+-+-+-+
2626 |u|v|wxy|z|A|
2627 +-+-+-+-+-+B|
2628 |E|F|I|JKL|C|
2629 +-+G+-+---+-+
2630 |Q|H|R|UVW|X|
2631 +-+-+-+-+-+-+
2632 |i|j|k|l|m|n|
2633 +-+-+-+-+-+-+
2634
2635 +-+-+-+-+-+-+
2636 |a|b|c|d|e|f|
2637 +-+-+-+-+-+-+
2638 |Z|0|S|3|456|
2639 | |1|T| |   |
2640 +-+2+-+-+-+-+
2641 |9| |abc|d|ef
2642 +-+-+-+-+-+-+
2643 |i|j|k|l|m|n|
2644 +-+-+-+-+-+-+
2645
2646 +-+-+
2647 |g|h|
2648 +-+-+
2649 |q|t|
2650 |r+-+
2651 |s|D|
2652 +-+-+
2653 |M|P|
2654 |N+-+
2655 |O|Y|
2656 +-+-+
2657 |o|p|
2658 +-+-+
2659
2660 +-+-+
2661 |g|h|
2662 +-+-+
2663 |7|8|
2664 | | |
2665 +-+-+
2666 fg|h|
2667 +-+-+
2668 |o|p|
2669 +-+-+
2670 ])
2671 AT_CHECK([render-test -o mb0 --min-break=0 input --width=14 --length=14], [0], [dnl
2672 +-+-+-+-+-+-+
2673 |a|b|c|d|e|f|
2674 +-+-+-+-+-+-+
2675 |i|jkl|m|nop|
2676 +-+-+-+-+-+-+
2677 |u|v|wxy|z|A|
2678 +-+-+-+-+-+B|
2679 |E|F|I|JKL|C|
2680 +-+G+-+---+-+
2681 |Q|H|R|UVW|X|
2682 +-+-+-+-+-+-+
2683 |i|j|k|l|m|n|
2684 +-+-+-+-+-+-+
2685
2686 +-+-+-+-+-+-+
2687 |a|b|c|d|e|f|
2688 +-+-+-+-+-+-+
2689 |Z|0|S|3|456|
2690 | |1|T| |   |
2691 +-+2+-+-+-+-+
2692 |9| |abc|d|ef
2693 +-+-+-+-+-+-+
2694 |i|j|k|l|m|n|
2695 +-+-+-+-+-+-+
2696
2697 +-+-+
2698 |g|h|
2699 +-+-+
2700 |q|t|
2701 |r+-+
2702 |s|D|
2703 +-+-+
2704 |M|P|
2705 |N+-+
2706 |O|Y|
2707 +-+-+
2708 |o|p|
2709 +-+-+
2710
2711 +-+-+
2712 |g|h|
2713 +-+-+
2714 |7|8|
2715 | | |
2716 +-+-+
2717 fg|h|
2718 +-+-+
2719 |o|p|
2720 +-+-+
2721 ])
2722 AT_CLEANUP
2723
2724 AT_SETUP([double break 8x8, with joins, all headers])
2725 AT_KEYWORDS([render rendering])
2726 AT_DATA([input], [WEAVE_8X8([1 1 1 1])])
2727 AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
2728 +-+-+-+-+-+-+
2729 |a|b|c|d|e|h|
2730 +-+-+-+-+-+-+
2731 |i|jkl|m|n|t|
2732 +-+-+-+-+-+-+
2733 |u|v|wxy|z|D|
2734 +-+-+-+-+-+-+
2735 |E|F|I|JKL|P|
2736 +-+G+-+---+-+
2737 |Q|H|R|UVW|Y|
2738 +-+-+-+-+-+-+
2739 |i|j|k|l|m|p|
2740 +-+-+-+-+-+-+
2741
2742 +-+-+-+-+-+-+
2743 |a|b|c|d|e|h|
2744 +-+-+-+-+-+-+
2745 |Z|0|S|3|4|8|
2746 | |1|T| | | |
2747 +-+2+-+-+-+-+
2748 |9| |abc|d|h|
2749 +-+-+-+-+-+-+
2750 |i|j|k|l|m|p|
2751 +-+-+-+-+-+-+
2752
2753 +-+--+-+-+
2754 |a| f|g|h|
2755 +-+--+-+-+
2756 |i|op|q|t|
2757 +-+--+r+-+
2758 |u| A|s|D|
2759 +-+ B+-+-+
2760 |E| C|M|P|
2761 +-+--+N+-+
2762 |Q| X|O|Y|
2763 +-+--+-+-+
2764 |i| n|o|p|
2765 +-+--+-+-+
2766
2767 +-+--+-+-+
2768 |a| f|g|h|
2769 +-+--+-+-+
2770 |Z|56|7|8|
2771 | |  | | |
2772 +-+--+-+-+
2773 |9| efg|h|
2774 +-+--+-+-+
2775 |i| n|o|p|
2776 +-+--+-+-+
2777 ])
2778 AT_CHECK([render-test -o mb0 --min-break=0 input --width=14 --length=14], [0], [dnl
2779 +-+-+-+-+-+-+
2780 |a|b|c|d|e|h|
2781 +-+-+-+-+-+-+
2782 |i|jkl|m|n|t|
2783 +-+-+-+-+-+-+
2784 |u|v|wxy|z|D|
2785 +-+-+-+-+-+-+
2786 |E|F|I|JKL|P|
2787 +-+G+-+---+-+
2788 |Q|H|R|UVW|Y|
2789 +-+-+-+-+-+-+
2790 |i|j|k|l|m|p|
2791 +-+-+-+-+-+-+
2792
2793 +-+-+-+-+-+-+
2794 |a|b|c|d|e|h|
2795 +-+-+-+-+-+-+
2796 |Z|0|S|3|4|8|
2797 | |1|T| | | |
2798 +-+2+-+-+-+-+
2799 |9| |abc|d|h|
2800 +-+-+-+-+-+-+
2801 |i|j|k|l|m|p|
2802 +-+-+-+-+-+-+
2803
2804 +-+--+-+-+
2805 |a| f|g|h|
2806 +-+--+-+-+
2807 |i|op|q|t|
2808 +-+--+r+-+
2809 |u| A|s|D|
2810 +-+ B+-+-+
2811 |E| C|M|P|
2812 +-+--+N+-+
2813 |Q| X|O|Y|
2814 +-+--+-+-+
2815 |i| n|o|p|
2816 +-+--+-+-+
2817
2818 +-+--+-+-+
2819 |a| f|g|h|
2820 +-+--+-+-+
2821 |Z|56|7|8|
2822 | |  | | |
2823 +-+--+-+-+
2824 |9| efg|h|
2825 +-+--+-+-+
2826 |i| n|o|p|
2827 +-+--+-+-+
2828 ])
2829 AT_CLEANUP
2830
2831 AT_SETUP([double break joined cells too big for page])
2832 AT_KEYWORDS([render rendering])
2833 AT_DATA([input], [7 7
2834 @a
2835 @b
2836 @c
2837 @d
2838 @e
2839 @f
2840 @g
2841 @h
2842 6*6 @The MISSING subcommand determines the handling of missing variables.  If INCLUDE is set, then user‑missing values are included in the calculations.  If NOINCLUDE is set, which is the default, user‑missing values are excluded.
2843 @i
2844 @j
2845 @k
2846 @l
2847 @m
2848 ])
2849 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
2850 +-+--+--+---+
2851 |a| b| c|  d|
2852 +-+--+--+---+
2853 |h|       The
2854 | |        su
2855 +-+    determ
2856 |i|       han
2857 | |missing va
2858 | |If INCLUDE
2859 +-+ then user
2860 |j|        va
2861 | |   include
2862 | | calculati
2863 +-+ NOINCLUDE
2864
2865 +-+ NOINCLUDE
2866 |k|      whic
2867 | |
2868 | |      user
2869 +-+        va
2870 |l|         e
2871 | |
2872 | |
2873 +-+
2874 |m|
2875 | |
2876 +-+----------
2877
2878 +--+--+--+
2879 | e| f| g|
2880 +--+--+--+
2881 e MISSING|
2882 ubcommand|
2883 mines the|
2884 ndling of|
2885 ariables.|
2886 E is set,|
2887 r‑missing|
2888 alues are|
2889 ed in the|
2890 ions.  If|
2891 E is set,|
2892
2893 E is set,|
2894 ch is the|
2895  default,|
2896 r‑missing|
2897 alues are|
2898 excluded.|
2899          |
2900          |
2901          |
2902          |
2903          |
2904 ---------+
2905 ])
2906 AT_CHECK([render-test -o mb0 --min-break=0 --width=15 --length=15 input], [0], [dnl
2907 +-+--+--+---+-
2908 |a| b| c|  d|
2909 +-+--+--+---+-
2910 |h|       The
2911 | |        sub
2912 +-+    determi
2913 |i|       hand
2914 | |missing var
2915 | |If INCLUDE
2916 +-+ then user‑
2917 |j|        val
2918 | |   included
2919 | | calculatio
2920 +-+ NOINCLUDE
2921 |k|      which
2922
2923 | |          d
2924 | |      user‑
2925 +-+        val
2926 |l|         ex
2927 | |
2928 | |
2929 +-+
2930 |m|
2931 | |
2932 +-+-----------
2933
2934 -+--+--+
2935 e| f| g|
2936 -+--+--+
2937 MISSING|
2938
2939 command|
2940 nes the|
2941 ling of|
2942 iables.|
2943 is set,|
2944 missing|
2945 ues are|
2946  in the|
2947 ns.  If|
2948 is set,|
2949  is the|
2950 efault,|
2951 missing|
2952 ues are|
2953 cluded.|
2954
2955        |
2956        |
2957        |
2958        |
2959        |
2960 -------+
2961 ])
2962 AT_CLEANUP
2963 \f
2964 AT_BANNER([output rendering -- problematic procedures])
2965
2966 dnl LIST used to put columns right up next to each other without any
2967 dnl intervening space, so this checks for regression.
2968 AT_SETUP([LIST puts space between columns])
2969 AT_KEYWORDS([render rendering])
2970 AT_DATA([list.sps], [dnl
2971 DATA LIST LIST NOTABLE /x y z (F1.0).
2972 BEGIN DATA.
2973 1 2 3
2974 4 5 6
2975 7 8 9
2976 END DATA.
2977 LIST.
2978 ])
2979 AT_CHECK([pspp list.sps], [0], [dnl
2980 Data List
2981 x y z
2982 -----
2983 1 2 3
2984 4 5 6
2985 7 8 9
2986 ])
2987 AT_CLEANUP
2988
2989 # Long string variables tend to end in lots of spaces.  The ASCII
2990 # driver didn't handle this very well: it would essentially produce
2991 # one blank line in a cell for each trailing space.  This test
2992 # checks for regression.  See bug #38672.
2993 AT_SETUP([ASCII driver renders end of line spaces reasonably])
2994 AT_KEYWORDS([render rendering])
2995 AT_DATA([input], [dnl
2996 3 3
2997 @a
2998 @b
2999 @xyzzy                                          @&t@
3000 @d
3001 @e
3002 @f
3003 @g
3004 @h
3005 @i
3006 ])
3007 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
3008 +-+-+-----+
3009 |a|b|xyzzy|
3010 +-+-+-----+
3011 |d|e|    f|
3012 +-+-+-----+
3013 |g|h|    i|
3014 +-+-+-----+
3015 ])
3016 AT_CLEANUP
3017
3018 # There was a bug that, when multiple cells spanned a single column
3019 # (or row), only the dimensions of the cell nearest the bottom of the
3020 # table were actually considered.  This checks for regression.  (This
3021 # problem was most easily observed with SYSFILE INFO, which uses lots
3022 # of spanned cells).
3023 #
3024 # Without the fix, the output looks like this:
3025 # +-------+
3026 # | A long|
3027 # |   text|
3028 # |string.|
3029 # +-------+
3030 # |shorter|
3031 AT_SETUP([multiple spanned cells all contribute to dimensions])
3032 AT_KEYWORDS([render rendering])
3033 AT_DATA([input], [dnl
3034 2 2
3035 1*2 @A long text string.
3036 1*2 @shorter
3037 ])
3038 AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl
3039 +-------------------+
3040 |A long text string.|
3041 +-------------------+
3042 |            shorter|
3043 +-------------------+
3044 ])
3045 AT_CLEANUP