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