66ae86f7470bbd6083c71fdf7457fa260907c2f2
[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([RENDER_WEAVE_6X6],
15   [AT_DATA([input], [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([RENDER_8X8],
60   [AT_DATA([input], [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([RENDER_8X8_2],
135   [AT_DATA([input], [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([single cell with border])
171 AT_KEYWORDS([render rendering])
172 AT_DATA([input], [1 1
173 @abc
174 ])
175 AT_CHECK([render-test input], [0], [dnl
176 +---+
177 |abc|
178 +---+
179 ])
180 AT_CLEANUP
181
182 AT_SETUP([joined columns])
183 AT_KEYWORDS([render rendering])
184 AT_DATA([input], [2 2
185 1*2 @abcdefg
186 @hij
187 @klm
188 ])
189 AT_CHECK([render-test input], [0], [dnl
190 +-------+
191 |abcdefg|
192 +---+---+
193 |hij|klm|
194 +---+---+
195 ])
196 AT_CLEANUP
197
198 AT_SETUP([3x3, joined rows and columns])
199 AT_KEYWORDS([render rendering])
200 AT_DATA([input], [3 3
201 1*2 @abc
202 2*1 @d\ne\nf
203 2*1 @g\nh\ni
204 @j
205 1*2 @klm
206 ])
207 AT_CHECK([render-test input], [0], [dnl
208 +---+-+
209 |abc|d|
210 +-+-+e|
211 |g|j|f|
212 |h+-+-+
213 |i|klm|
214 +-+---+
215 ])
216 AT_CLEANUP
217
218 AT_SETUP([6x6, joined rows and columns])
219 AT_KEYWORDS([render rendering])
220 RENDER_WEAVE_6X6
221 AT_CHECK([render-test input], [0], [dnl
222 +-+---+-+-+-+
223 |a|bcd|e|f|i|
224 +-+-+-+-+g+-+
225 |j|m|nop|h|q|
226 |k+-+-+-+-+r|
227 |l|t|w|xyz|s|
228 +-+u+-+-+-+-+
229 |A|v|B|E|FGH|
230 +-+-+C+-+-+-+
231 |IJK|D|L|O|P|
232 +-+-+-+M+-+-+
233 |Q|RST|N|U|V|
234 +-+---+-+-+-+
235 ])
236 AT_CLEANUP
237
238 AT_SETUP([3 rows with many joined cells])
239 AT_KEYWORDS([render rendering])
240 AT_CAPTURE_FILE([input])
241 AT_DATA([input], [3 19
242 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
243 ])@1
244 m4_for([x], [2], [19], [1], [1*2 @x
245 ])@20
246 ])
247 AT_CHECK([render-test input], [0], [dnl
248  a b c d e f g h i j k l m n o p q r  s
249 +-+---+---+---+---+---+---+---+---+----+
250 |1|  2|  3|  4|  5|  6|  7|  8|  9|  10|
251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
252 | 11| 12| 13| 14| 15| 16| 17| 18| 19|20|
253 +---+---+---+---+---+---+---+---+---+--+
254 ])
255 AT_CLEANUP
256
257 AT_SETUP([3 columns with many joined cells])
258 AT_KEYWORDS([render rendering])
259 AT_CAPTURE_FILE([input])
260 AT_DATA([input], [3 19
261 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
262 ])@1
263 m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
264 ])@20
265 ])
266 AT_CHECK([render-test --transpose input], [0], [dnl
267  +--+--+
268 a| 1|11|
269  +--+ab|
270 b| 2|cd|
271  |ab+--+
272 c|cd|12|
273  +--+ab|
274 d| 3|cd|
275  |ab+--+
276 e|cd|13|
277  +--+ab|
278 f| 4|cd|
279  |ab+--+
280 g|cd|14|
281  +--+ab|
282 h| 5|cd|
283  |ab+--+
284 i|cd|15|
285  +--+ab|
286 j| 6|cd|
287  |ab+--+
288 k|cd|16|
289  +--+ab|
290 l| 7|cd|
291  |ab+--+
292 m|cd|17|
293  +--+ab|
294 n| 8|cd|
295  |ab+--+
296 o|cd|18|
297  +--+ab|
298 p| 9|cd|
299  |ab+--+
300 q|cd|19|
301  +--+ab|
302 r|10|cd|
303  |ab+--+
304 s|cd|20|
305  +--+--+
306 ])
307 AT_CLEANUP
308
309 AT_SETUP([joined rows])
310 AT_KEYWORDS([render rendering])
311 AT_DATA([input], [2 2
312 2*1 @ab\ncd\nef
313 @hij
314 @klm
315 ])
316 AT_CHECK([render-test input], [0], [dnl
317 +--+---+
318 |ab|hij|
319 |cd+---+
320 |ef|klm|
321 +--+---+
322 ])
323 AT_CLEANUP
324
325 dnl This checks for bug #31346, a segmentation fault that surfaced
326 dnl when two or more rows  had no unspanned cells and no rules.
327 AT_SETUP([joined rows only, no rules])
328 AT_KEYWORDS([render rendering])
329 AT_DATA([input], [2 2
330 2*1 ab\ncd\nef
331 2*1 hij\nklm\nnop
332 ])
333 AT_CHECK([render-test input], [0], [dnl
334 ab hij
335 cd klm
336 ef nop
337 ])
338 AT_CLEANUP
339
340 AT_SETUP([joined columns only, no rules])
341 AT_KEYWORDS([render rendering])
342 AT_DATA([input], [2 2
343 1*2 abc\ndef
344 1*2 hij\nklm\nnop
345 ])
346 AT_CHECK([render-test input], [0], [dnl
347 abc
348 def
349 hij
350 klm
351 nop
352 ])
353 AT_CLEANUP
354
355 AT_SETUP([5 big narrow cells])
356 AT_KEYWORDS([render rendering])
357 AT_DATA([input], [1 5
358 @This cell has a lot of text but its minimum width is pretty narrow.
359 @This cell also has a lot of text but its minimum width is pretty narrow.
360 @A third cell with a lot of text but a pretty narrow minimum width.
361 @A fourth cell with a lot of text but a pretty narrow minimum width.
362 @A fifth cell with a lot of text but a pretty narrow minimum width.
363 ])
364 AT_CHECK([render-test input], [0], [dnl
365 +---------------+---------------+--------------+---------------+--------------+
366 |This cell has a| This cell also|  A third cell|  A fourth cell|  A fifth cell|
367 |lot of text but|   has a lot of| with a lot of|  with a lot of| with a lot of|
368 |    its minimum|   text but its|    text but a|     text but a|    text but a|
369 |width is pretty|  minimum width| pretty narrow|  pretty narrow| pretty narrow|
370 |        narrow.|      is pretty|minimum width.| minimum width.|minimum width.|
371 |               |        narrow.|              |               |              |
372 +---------------+---------------+--------------+---------------+--------------+
373 ])
374 AT_CLEANUP
375
376 AT_SETUP([9 big narrow cells])
377 AT_KEYWORDS([render rendering])
378 AT_DATA([input], [1 9
379 @This cell has a lot of text but its minimum width is pretty narrow.
380 @This cell also has a lot of text but its minimum width is pretty narrow.
381 @A third cell with a lot of text but a pretty narrow minimum width.
382 @A fourth cell with a lot of text but a pretty narrow minimum width.
383 @A fifth cell with a lot of text but a pretty narrow minimum width.
384 @A sixth cell with a lot of text but a pretty narrow minimum width.
385 @A seventh cell with a lot of text but a pretty narrow minimum width.
386 @A eighth cell with a lot of text but a pretty narrow minimum width.
387 @A ninth cell with a lot of text but a pretty narrow minimum width.
388 ])
389 AT_CHECK([render-test input], [0], [dnl
390 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
391 |    This|   This| A third|A fourth|A fifth| A sixth|       A|      A| A ninth|
392 |cell has|   cell|    cell|    cell|   cell|    cell| seventh| eighth|    cell|
393 |a lot of|   also|  with a|  with a| with a|  with a|    cell|   cell|  with a|
394 |text but|  has a|  lot of|  lot of| lot of|  lot of|  with a| with a|  lot of|
395 |     its| lot of|text but|text but|   text|text but|  lot of| lot of|text but|
396 | minimum|   text|a pretty|a pretty|  but a|a pretty|text but|   text|a pretty|
397 |width is|but its|  narrow|  narrow| pretty|  narrow|a pretty|  but a|  narrow|
398 |  pretty|minimum| minimum| minimum| narrow| minimum|  narrow| pretty| minimum|
399 | narrow.|  width|  width.|  width.|minimum|  width.| minimum| narrow|  width.|
400 |        |     is|        |        | width.|        |  width.|minimum|        |
401 |        | pretty|        |        |       |        |        | width.|        |
402 |        |narrow.|        |        |       |        |        |       |        |
403 +--------+-------+--------+--------+-------+--------+--------+-------+--------+
404 ])
405 AT_CLEANUP
406
407 AT_SETUP([2 big cells with new-lines])
408 AT_KEYWORDS([render rendering])
409 AT_DATA([input], [1 2
410 @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.
411 @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.
412 ])
413 AT_CHECK([render-test input], [0], [dnl
414 +----------------------------------------------------------+------------------+
415 |      PSPP does not place many restrictions on ordering of|     PSPP includes|
416 |  commands. The main restriction is that variables must be|   special support|
417 |       defined before they are otherwise referenced.  This|       for unknown|
418 |    section describes the details of command ordering, but|      numeric data|
419 |       most users will have no need to refer to them. PSPP|           values.|
420 |     possesses five internal states, called initial, INPUT|           Missing|
421 | PROGRAM, FILE TYPE, transformation, and procedure states.|  observations are|
422 |                                                          |          assigned|
423 |                                                          |  a special value,|
424 |                                                          |        called the|
425 |                                                          |  ``system‑missing|
426 |                                                          |    value''.  This|
427 |                                                          |``value'' actually|
428 |                                                          |     indicates the|
429 |                                                          |      absence of a|
430 |                                                          |         value; it|
431 |                                                          |    means that the|
432 |                                                          |            actual|
433 |                                                          | value is unknown.|
434 +----------------------------------------------------------+------------------+
435 ])
436 AT_CLEANUP
437
438 AT_SETUP([8x8 with many 2x2 joins])
439 AT_KEYWORDS([render rendering])
440 RENDER_8X8_2
441 AT_CHECK([render-test input], [0],[dnl
442 +---+---+----+----+
443 |abc|jkl| mno| vwx|
444 |def|   | pqr|    |
445 |ghi+---+ stu+----+
446 |   |yzA|    | HIJ|
447 +-+-+BCD+-+--+ KLM|
448 |Q|V|EFG|W| Z| NOP|
449 |R| |   |X|  |    |
450 |S+-+-+-+Y+--+-+--+
451 |T|012|9| | abc| j|
452 |U|345| | | def| k|
453 | |678+-+-+ ghi| l|
454 | |   |opq|    | m|
455 +-+-+-+rst+----+ n|
456 |xyz|G|uvw| JKL|  |
457 |ABC|H|   |    |  |
458 |DEF|I+---+--+-+--+
459 |   | | MNOPQ| 123|
460 +---+-+ RSTUV| 456|
461 |abcde| WXYZ0| 789|
462 |     |      |    |
463 +-----+------+----+
464 ])
465 AT_CLEANUP
466 \f
467 AT_BANNER([output rendering -- horizontal page breaks])
468
469 AT_SETUP([breaking row of many small cells])
470 AT_KEYWORDS([render rendering])
471 AT_CAPTURE_FILE([input])
472 AT_DATA([input], [1 50
473 m4_for([x], [1], [50], [1], [@x
474 ])])
475 AT_CHECK([render-test input], [0], [dnl
476 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
477 |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|
478 +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
479
480 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
481 |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|
482 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
483 ])
484 AT_CLEANUP
485
486 AT_SETUP([breaking row of many small cells, with headers])
487 AT_KEYWORDS([render rendering])
488 AT_CAPTURE_FILE([input])
489 AT_DATA([input], [1 54 2 2
490 @ha
491 @hb
492 m4_for([x], [1], [50], [1], [@x
493 ])dnl
494 @hc
495 @hd
496 ])
497 AT_CHECK([render-test input], [0], [dnl
498 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
499 |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|
500 +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
501
502 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
503 |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|
504 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
505
506 +--+--+--+--+--+--+--+
507 |ha|hb|48|49|50|hc|hd|
508 +--+--+--+--+--+--+--+
509 ])
510 AT_CLEANUP
511
512 AT_SETUP([breaking row of many medium-size cells])
513 AT_KEYWORDS([render rendering])
514 AT_CAPTURE_FILE([input])
515 AT_DATA([input], [1 50
516 m4_for([x], [1], [50], [1], [@cell x
517 ])])
518 AT_CHECK([render-test input], [0], [dnl
519 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
520 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
521 |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|  13|  14|  15|
522 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
523
524 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
525 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
526 |  16|  17|  18|  19|  20|  21|  22|  23|  24|  25|  26|  27|  28|  29|  30|
527 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
528
529 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
530 |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|
531 |  31|  32|  33|  34|  35|  36|  37|  38|  39|  40|  41|  42|  43|  44|  45|
532 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
533
534 +----+----+----+----+----+
535 |cell|cell|cell|cell|cell|
536 |  46|  47|  48|  49|  50|
537 +----+----+----+----+----+
538 ])
539 AT_CLEANUP
540
541 AT_SETUP([breaking row of many medium-size cells, with headers])
542 AT_KEYWORDS([render rendering])
543 AT_CAPTURE_FILE([input])
544 AT_DATA([input], [1 52 1 1
545 header1
546 m4_for([x], [1], [50], [1], [@cell x
547 ])dnl
548 header2
549 ])
550 AT_CHECK([render-test input], [0], [dnl
551        +----+----+----+----+----+----+----+----+----+----+----+----+
552 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
553        |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|  11|  12|
554        +----+----+----+----+----+----+----+----+----+----+----+----+
555
556        +----+----+----+----+----+----+----+----+----+----+----+----+
557 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
558        |  13|  14|  15|  16|  17|  18|  19|  20|  21|  22|  23|  24|
559        +----+----+----+----+----+----+----+----+----+----+----+----+
560
561        +----+----+----+----+----+----+----+----+----+----+----+----+
562 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
563        |  25|  26|  27|  28|  29|  30|  31|  32|  33|  34|  35|  36|
564        +----+----+----+----+----+----+----+----+----+----+----+----+
565
566        +----+----+----+----+----+----+----+----+----+----+----+----+
567 header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2
568        |  37|  38|  39|  40|  41|  42|  43|  44|  45|  46|  47|  48|
569        +----+----+----+----+----+----+----+----+----+----+----+----+
570
571        +----+----+
572 header1|cell|cell|header2
573        |  49|  50|
574        +----+----+
575 ])
576 AT_CLEANUP
577
578 AT_SETUP([breaking row of many big narrow cells])
579 AT_KEYWORDS([render rendering])
580 AT_CAPTURE_FILE([input])
581 AT_DATA([input], [1 50
582 m4_for([x], [1], [50], [1], [@This is cell x in a series of 50.
583 ])])
584 AT_CHECK([render-test input], [0], [dnl
585 +------+------+------+------+------+------+------+------+------+------+------+
586 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
587 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
588 |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9|  cell|  cell|
589 |  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a|  in a| 10 in| 11 in|
590 |series|series|series|series|series|series|series|series|series|     a|     a|
591 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|
592 |      |      |      |      |      |      |      |      |      |of 50.|of 50.|
593 +------+------+------+------+------+------+------+------+------+------+------+
594
595 +------+------+------+------+------+------+------+------+------+------+------+
596 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
597 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
598 |  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
599 | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in|
600 |     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
601 |series|series|series|series|series|series|series|series|series|series|series|
602 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
603 +------+------+------+------+------+------+------+------+------+------+------+
604
605 +------+------+------+------+------+------+------+------+------+------+------+
606 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
607 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
608 |  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
609 | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in|
610 |     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
611 |series|series|series|series|series|series|series|series|series|series|series|
612 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
613 +------+------+------+------+------+------+------+------+------+------+------+
614
615 +------+------+------+------+------+------+------+------+------+------+------+
616 |  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|  This|
617 |    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|    is|
618 |  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|  cell|
619 | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in|
620 |     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|     a|
621 |series|series|series|series|series|series|series|series|series|series|series|
622 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
623 +------+------+------+------+------+------+------+------+------+------+------+
624
625 +------+------+------+------+------+------+
626 |  This|  This|  This|  This|  This|  This|
627 |    is|    is|    is|    is|    is|    is|
628 |  cell|  cell|  cell|  cell|  cell|  cell|
629 | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in|
630 |     a|     a|     a|     a|     a|     a|
631 |series|series|series|series|series|series|
632 |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|
633 +------+------+------+------+------+------+
634 ])
635 AT_CLEANUP
636
637 AT_SETUP([breaking 2 rows of many small cells])
638 AT_KEYWORDS([render rendering])
639 AT_CAPTURE_FILE([input])
640 AT_DATA([input], [2 50
641 m4_for([x], [1], [100], [1], [@x
642 ])])
643 AT_CHECK([render-test input], [0], [dnl
644 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
645 | 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|
646 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
647 |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|
648 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
649
650 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
651 |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50|
652 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
653 |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|
654 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+
655 ])
656 AT_CLEANUP
657
658 AT_SETUP([breaking 3 rows with many joined cells])
659 AT_KEYWORDS([render rendering])
660 AT_CAPTURE_FILE([input])
661 AT_DATA([input], [3 49
662 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
663 A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var
664 ])@1
665 m4_for([x], [2], [49], [1], [1*2 @x
666 ])@50
667 ])
668 AT_CHECK([render-test input], [0], [dnl
669  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
670 +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
671 |1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20|
672 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
673 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4
674 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
675
676  N O P Q R S T U V  W
677 +---+---+---+---+----+
678 | 21| 22| 23| 24|  25|
679 +-+-+-+-+-+-+-+-+-+--+
680 45| 46| 47| 48| 49|50|
681 --+---+---+---+---+--+
682 ])
683 AT_CLEANUP
684
685 AT_SETUP([horz break 6x6, joined rows and columns])
686 AT_KEYWORDS([render rendering])
687 RENDER_WEAVE_6X6
688 AT_CHECK([render-test --width=6 input], [0], [dnl
689 +-+--
690 |a|bc
691 +-+-+
692 |j|m|
693 |k+-+
694 |l|t|
695 +-+u|
696 |A|v|
697 +-+-+
698 |IJK|
699 +-+-+
700 |Q|RS
701 +-+--
702
703 --+-+
704 cd|e|
705 +-+-+
706 |nop|
707 +-+-+
708 |w|xy
709 +-+-+
710 |B|E|
711 |C+-+
712 |D|L|
713 +-+M|
714 ST|N|
715 --+-+
716
717 +-+-+
718 |f|i|
719 |g+-+
720 |h|q|
721 +-+r|
722 yz|s|
723 +-+-+
724 |FGH|
725 +-+-+
726 |O|P|
727 +-+-+
728 |U|V|
729 +-+-+
730 ])
731 AT_CLEANUP
732
733 AT_SETUP([horz break 6x6, joined rows and columns, left header])
734 AT_KEYWORDS([render rendering])
735 RENDER_WEAVE_6X6([1 0 0 0])
736 AT_CHECK([render-test --width=10 input], [0], [dnl
737 +-+---+-+
738 |a|bcd|e|
739 +-+-+-+-+
740 |j|m|nop|
741 |k+-+-+-+
742 |l|t|w|xy
743 +-+u+-+-+
744 |A|v|B|E|
745 +-+-+C+-+
746 |IJK|D|L|
747 +-+-+-+M|
748 |Q|RST|N|
749 +-+---+-+
750
751 +-+-+-+
752 |a|f|i|
753 +-+g+-+
754 |j|h|q|
755 |k+-+r|
756 |l|z|s|
757 +-+-+-+
758 |A|FGH|
759 +-+-+-+
760 |K|O|P|
761 +-+-+-+
762 |Q|U|V|
763 +-+-+-+
764 ])
765 AT_CLEANUP
766
767 AT_SETUP([horz break 6x6, joined rows and columns, right header])
768 AT_KEYWORDS([render rendering])
769 RENDER_WEAVE_6X6([0 1 0 0])
770 AT_CHECK([render-test --width=10 input], [0], [dnl
771 +-+---+-+
772 |a|bcd|i|
773 +-+-+-+-+
774 |j|m|n|q|
775 |k+-+-+r|
776 |l|t|w|s|
777 +-+u+-+-+
778 |A|v|B|H|
779 +-+-+C+-+
780 |IJK|D|P|
781 +-+-+-+-+
782 |Q|RST|V|
783 +-+---+-+
784
785 +-+-+-+
786 |e|f|i|
787 +-+g+-+
788 op|h|q|
789 +-+-+r|
790 |xyz|s|
791 +-+-+-+
792 |E|FGH|
793 +-+-+-+
794 |L|O|P|
795 |M+-+-+
796 |N|U|V|
797 +-+-+-+
798 ])
799 AT_CLEANUP
800
801 AT_SETUP([breaking joined cells too wide for page])
802 AT_KEYWORDS([render rendering])
803 AT_DATA([input], [4 6
804 1*6 @abc def ghi jkl
805 1*3 @mno pqr
806 1*3 @stu vwx
807 1*2 @yzA
808 1*2 @BCD
809 1*2 @EFG
810 @H
811 @I
812 @J
813 @K
814 @L
815 @M
816 ])
817 AT_CHECK([render-test --width=10 input], [0], [dnl
818 +--------
819 |abc def
820 |
821 +-----+--
822 |  mno|
823 |  pqr|
824 +---+-+-+
825 |yzA|BCD|
826 +-+-+-+-+
827 |H|I|J|K|
828 +-+-+-+-+
829
830 ----+
831  ghi|
832  jkl|
833 ----+
834  stu|
835  vwx|
836 +---+
837 |EFG|
838 +-+-+
839 |L|M|
840 +-+-+
841 ])
842 AT_CLEANUP
843
844 AT_SETUP([breaking joined cells much too wide for page])
845 AT_KEYWORDS([render rendering])
846 AT_DATA([input], [4 6
847 1*6 @abc def ghi jkl
848 1*3 @mno pqr
849 1*3 @stu vwx
850 1*2 @yzA
851 1*2 @BCD
852 1*2 @EFG
853 @H
854 @I
855 @J
856 @K
857 @L
858 @M
859 ])
860 AT_CHECK([render-test --width=6 input], [0], [dnl
861 +----
862 |abc
863 |
864 +----
865 |  mn
866 |  pq
867 +---+
868 |yzA|
869 +-+-+
870 |H|I|
871 +-+-+
872
873 -----
874  def
875
876 --+--
877 no|
878 qr|
879 +-+-+
880 |BCD|
881 +-+-+
882 |J|K|
883 +-+-+
884
885 ----+
886  ghi|
887  jkl|
888 ----+
889  stu|
890  vwx|
891 +---+
892 |EFG|
893 +-+-+
894 |L|M|
895 +-+-+
896 ])
897 AT_CLEANUP
898
899 AT_SETUP([breaking cell too wide for page, no border])
900 AT_KEYWORDS([render rendering])
901 AT_CAPTURE_FILE([input])
902 AT_DATA([input], [1 1
903 abcdefghijklmnopqrstuvwxyz
904 ])
905 AT_CHECK([render-test --width=6 input], [0], [dnl
906 abcdef
907
908 ghijkl
909
910 mnopqr
911
912 stuvwx
913
914 yz
915 ])
916 AT_CLEANUP
917
918 AT_SETUP([breaking cell too wide for page, with border])
919 AT_KEYWORDS([render rendering])
920 AT_CAPTURE_FILE([input])
921 AT_DATA([input], [1 1
922 @abcdefghijklmnopqrstuvwxyz
923 ])
924 AT_CHECK([render-test --width=6 input], [0], [dnl
925 +-----
926 |abcde
927 +-----
928
929 ------
930 defghi
931 ------
932
933 ------
934 hijklm
935 ------
936
937 ------
938 lmnopq
939 ------
940
941 ------
942 pqrstu
943 ------
944
945 ------
946 tuvwxy
947 ------
948
949 ---+
950 xyz|
951 ---+
952 ])
953 AT_CLEANUP
954
955 AT_SETUP([horz break 8x8 with many 2x2 joins])
956 AT_KEYWORDS([render rendering])
957 RENDER_8X8_2
958 AT_CHECK([render-test --width=8 input], [0],[dnl
959 +---+--
960 |abc|jk
961 |def|  
962 |ghi+--
963 |   |yz
964 +-+-+BC
965 |Q|V|EF
966 |R| |  
967 |S+-+-+
968 |T|012|
969 |U|345|
970 | |678|
971 | |   |
972 +-+-+-+
973 |xyz|G|
974 |ABC|H|
975 |DEF|I|
976 |   | |
977 +---+-+
978 |abcde|
979 |     |
980 +-----+
981
982 --+----+
983 kl| mno|
984   | pqr|
985 --+ stu|
986 zA|    |
987 CD+-+--+
988 FG|W| Z|
989   |X|  |
990 +-+Y+--+
991 |9| | ab
992 | | | de
993 +-+-+ gh
994 |opq|   
995 |rst+---
996 |uvw| JK
997 |   |   
998 +---+--+
999 | MNOPQ|
1000 | RSTUV|
1001 | WXYZ0|
1002 |      |
1003 +------+
1004
1005 +----+
1006 | vwx|
1007 |    |
1008 +----+
1009 | HIJ|
1010 | KLM|
1011 | NOP|
1012 |    |
1013 +-+--+
1014 bc| j|
1015 ef| k|
1016 hi| l|
1017   | m|
1018 --+ n|
1019 KL|  |
1020   |  |
1021 +-+--+
1022 | 123|
1023 | 456|
1024
1025 | 456|
1026 | 789|
1027 |    |
1028 +----+
1029 ])
1030 AT_CLEANUP
1031 \f
1032 AT_BANNER([output rendering -- vertical page breaks])
1033
1034 AT_SETUP([breaking column of many small cells])
1035 AT_KEYWORDS([render rendering])
1036 AT_CAPTURE_FILE([input])
1037 AT_DATA([input], [20 1
1038 m4_for([x], [1], [20], [1], [@x
1039 ])])
1040 AT_CHECK([render-test --length=10 input], [0], [dnl
1041 +--+
1042 | 1|
1043 +--+
1044 | 2|
1045 +--+
1046 | 3|
1047 +--+
1048 | 4|
1049 +--+
1050
1051 +--+
1052 | 5|
1053 +--+
1054 | 6|
1055 +--+
1056 | 7|
1057 +--+
1058 | 8|
1059 +--+
1060
1061 +--+
1062 | 9|
1063 +--+
1064 |10|
1065 +--+
1066 |11|
1067 +--+
1068 |12|
1069 +--+
1070
1071 +--+
1072 |13|
1073 +--+
1074 |14|
1075 +--+
1076 |15|
1077 +--+
1078 |16|
1079 +--+
1080
1081 +--+
1082 |17|
1083 +--+
1084 |18|
1085 +--+
1086 |19|
1087 +--+
1088 |20|
1089 +--+
1090 ])
1091 AT_CLEANUP
1092
1093 AT_SETUP([breaking column of many small cells, with headers])
1094 AT_KEYWORDS([render rendering])
1095 AT_CAPTURE_FILE([input])
1096 AT_DATA([input], [17 1 0 0 1 1
1097 @a
1098 m4_for([x], [1], [15], [1], [@x
1099 ])@b
1100 ])
1101 AT_CHECK([render-test --length=13 input], [0], [dnl
1102 +--+
1103 | a|
1104 +--+
1105 | 1|
1106 +--+
1107 | 2|
1108 +--+
1109 | 3|
1110 +--+
1111 | 4|
1112 +--+
1113 | b|
1114 +--+
1115
1116 +--+
1117 | a|
1118 +--+
1119 | 5|
1120 +--+
1121 | 6|
1122 +--+
1123 | 7|
1124 +--+
1125 | 8|
1126 +--+
1127 | b|
1128 +--+
1129
1130 +--+
1131 | a|
1132 +--+
1133 | 9|
1134 +--+
1135 |10|
1136 +--+
1137 |11|
1138 +--+
1139 |12|
1140 +--+
1141 | b|
1142 +--+
1143
1144 +--+
1145 | a|
1146 +--+
1147 |13|
1148 +--+
1149 |14|
1150 +--+
1151 |15|
1152 +--+
1153 | b|
1154 +--+
1155 ])
1156 AT_CLEANUP
1157
1158 AT_SETUP([disabling too-big headers])
1159 AT_KEYWORDS([render rendering])
1160 AT_CAPTURE_FILE([input])
1161 AT_DATA([input], [17 1 0 0 1 1
1162 @a
1163 m4_for([x], [1], [15], [1], [@x
1164 ])@b
1165 ])
1166 AT_CHECK([render-test --length=10 input], [0], [dnl
1167 +--+
1168 | a|
1169 +--+
1170 | 1|
1171 +--+
1172 | 2|
1173 +--+
1174 | 3|
1175 +--+
1176
1177 +--+
1178 | 4|
1179 +--+
1180 | 5|
1181 +--+
1182 | 6|
1183 +--+
1184 | 7|
1185 +--+
1186
1187 +--+
1188 | 8|
1189 +--+
1190 | 9|
1191 +--+
1192 |10|
1193 +--+
1194 |11|
1195 +--+
1196
1197 +--+
1198 |12|
1199 +--+
1200 |13|
1201 +--+
1202 |14|
1203 +--+
1204 |15|
1205 +--+
1206
1207 +--+
1208 | b|
1209 +--+
1210 ])
1211 AT_CLEANUP
1212
1213 AT_SETUP([breaking column of many medium-size cells])
1214 AT_KEYWORDS([render rendering])
1215 AT_CAPTURE_FILE([input])
1216 AT_DATA([input], [20 1
1217 m4_for([x], [1], [20], [1], [@top x\ncell x\nbottom x
1218 ])])
1219 AT_CHECK([render-test --length 10 input], [0], [dnl
1220 +---------+
1221 |    top 1|
1222 |   cell 1|
1223 | bottom 1|
1224 +---------+
1225 |    top 2|
1226 |   cell 2|
1227 | bottom 2|
1228 +---------+
1229
1230 +---------+
1231 |    top 3|
1232 |   cell 3|
1233 | bottom 3|
1234 +---------+
1235 |    top 4|
1236 |   cell 4|
1237 | bottom 4|
1238 +---------+
1239
1240 +---------+
1241 |    top 5|
1242 |   cell 5|
1243 | bottom 5|
1244 +---------+
1245 |    top 6|
1246 |   cell 6|
1247 | bottom 6|
1248 +---------+
1249
1250 +---------+
1251 |    top 7|
1252 |   cell 7|
1253 | bottom 7|
1254 +---------+
1255 |    top 8|
1256 |   cell 8|
1257 | bottom 8|
1258 +---------+
1259
1260 +---------+
1261 |    top 9|
1262 |   cell 9|
1263 | bottom 9|
1264 +---------+
1265 |   top 10|
1266 |  cell 10|
1267 |bottom 10|
1268 +---------+
1269
1270 +---------+
1271 |   top 11|
1272 |  cell 11|
1273 |bottom 11|
1274 +---------+
1275 |   top 12|
1276 |  cell 12|
1277 |bottom 12|
1278 +---------+
1279
1280 +---------+
1281 |   top 13|
1282 |  cell 13|
1283 |bottom 13|
1284 +---------+
1285 |   top 14|
1286 |  cell 14|
1287 |bottom 14|
1288 +---------+
1289
1290 +---------+
1291 |   top 15|
1292 |  cell 15|
1293 |bottom 15|
1294 +---------+
1295 |   top 16|
1296 |  cell 16|
1297 |bottom 16|
1298 +---------+
1299
1300 +---------+
1301 |   top 17|
1302 |  cell 17|
1303 |bottom 17|
1304 +---------+
1305 |   top 18|
1306 |  cell 18|
1307 |bottom 18|
1308 +---------+
1309
1310 +---------+
1311 |   top 19|
1312 |  cell 19|
1313 |bottom 19|
1314 +---------+
1315 |   top 20|
1316 |  cell 20|
1317 |bottom 20|
1318 +---------+
1319 ])
1320 AT_CLEANUP
1321
1322 AT_SETUP([breaking 3 columns with many joined cells])
1323 AT_KEYWORDS([render rendering])
1324 AT_CAPTURE_FILE([input])
1325 AT_DATA([input], [3 19
1326 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
1327 ])@1
1328 m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
1329 ])@20
1330 ])
1331 AT_CHECK([render-test --length=6 --transpose input], [0], [dnl
1332  +--+--+
1333 a| 1|11|
1334  +--+ab|
1335 b| 2|cd|
1336  |ab+--+
1337
1338  |ab+--+
1339 c|cd|12|
1340  +--+ab|
1341 d| 3|cd|
1342  |ab+--+
1343
1344  |ab+--+
1345 e|cd|13|
1346  +--+ab|
1347 f| 4|cd|
1348  |ab+--+
1349
1350  |ab+--+
1351 g|cd|14|
1352  +--+ab|
1353 h| 5|cd|
1354  |ab+--+
1355
1356  |ab+--+
1357 i|cd|15|
1358  +--+ab|
1359 j| 6|cd|
1360  |ab+--+
1361
1362  |ab+--+
1363 k|cd|16|
1364  +--+ab|
1365 l| 7|cd|
1366  |ab+--+
1367
1368  |ab+--+
1369 m|cd|17|
1370  +--+ab|
1371 n| 8|cd|
1372  |ab+--+
1373
1374  |ab+--+
1375 o|cd|18|
1376  +--+ab|
1377 p| 9|cd|
1378  |ab+--+
1379
1380  |ab+--+
1381 q|cd|19|
1382  +--+ab|
1383 r|10|cd|
1384  |ab+--+
1385
1386  |ab+--+
1387 s|cd|20|
1388  +--+--+
1389 ])
1390 AT_CLEANUP
1391
1392 AT_SETUP([vert break 6x6, joined rows and columns])
1393 AT_KEYWORDS([render rendering])
1394 RENDER_WEAVE_6X6
1395 AT_CHECK([render-test --length=6 input], [0], [dnl
1396 +-+---+-+-+-+
1397 |a|bcd|e|f|i|
1398 +-+-+-+-+g+-+
1399 |j|m|nop|h|q|
1400 |k+-+---+-+r|
1401
1402 |k+-+-+---+r|
1403 |l|t|w|xyz|s|
1404 +-+u+-+-+-+-+
1405 |A|v|B|E|FGH|
1406 +-+-+C+-+---+
1407
1408 +---+C+-+-+-+
1409 |IJK|D|L|O|P|
1410 +-+-+-+M+-+-+
1411 |Q|RST|N|U|V|
1412 +-+---+-+-+-+
1413 ])
1414 AT_CLEANUP
1415
1416 AT_SETUP([breaking joined cells too tall for page])
1417 AT_KEYWORDS([render rendering])
1418 AT_DATA([input], [4 6
1419 1*6 @abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyzA\nBCD\nEFG
1420 1*3 @HIJ\nKLM\nOPQ\nRST\nUVW
1421 1*3 @XYZ\n012\n345\n678\n90a
1422 1*2 @bcd\nefg\nhij
1423 1*2 @klm\nnop\nqrs
1424 1*2 @tuv\nwxy\nzAB
1425 @C
1426 @D
1427 @E
1428 @F
1429 @G
1430 @H
1431 ])
1432 AT_CHECK([render-test --transpose --length=6 input], [0], [dnl
1433 +---+---+---+-+
1434 |abc|HIJ|bcd|C|
1435 |def|KLM|efg+-+
1436 |ghi|OPQ|hij|D|
1437 |jkl|RST+---+-+
1438
1439 |jkl|RST+---+-+
1440 |mno|UVW|klm|E|
1441 |pqr+---+nop+-+
1442 |stu|XYZ|qrs|F|
1443 |vwx|012+---+-+
1444
1445 |vwx|012+---+-+
1446 |yzA|345|tuv|G|
1447 |BCD|678|wxy+-+
1448 |EFG|90a|zAB|H|
1449 +---+---+---+-+
1450 ])
1451 AT_CLEANUP
1452
1453 AT_SETUP([breaking cell too tall for page, no border])
1454 AT_KEYWORDS([render rendering])
1455 AT_CAPTURE_FILE([input])
1456 AT_DATA([input], [1 1
1457 abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ
1458 ])
1459 AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl
1460    abc
1461   defg
1462    hij
1463   klmn
1464    opq
1465   rstu
1466
1467 vwx yz
1468  ABCDE
1469  FGH I
1470     JK
1471  LMNOP
1472 QR STU
1473
1474  VWXYZ
1475 ])
1476 AT_CLEANUP
1477
1478 AT_SETUP([breaking cell too tall for page, with border])
1479 AT_KEYWORDS([render rendering])
1480 AT_CAPTURE_FILE([input])
1481 AT_DATA([input], [1 1
1482 @abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ
1483 ])
1484 AT_CHECK([render-test --width=7 --length=6 input], [0], [dnl
1485 +-----+
1486 |  abc|
1487 | defg|
1488 |  hij|
1489 | klmn|
1490 |  opq|
1491
1492 | klmn|
1493 |  opq|
1494 | rstu|
1495 |  vwx|
1496 |   yz|
1497 |ABCDE|
1498
1499 |   yz|
1500 |ABCDE|
1501 |FGH I|
1502 |   JK|
1503 |LMNOP|
1504 |   QR|
1505
1506 |LMNOP|
1507 |   QR|
1508 |  STU|
1509 |VWXYZ|
1510 +-----+
1511 ])
1512 AT_CLEANUP
1513 \f
1514 AT_BANNER([output rendering -- double page breaks])
1515
1516 AT_SETUP([double break 6x6, joined rows and columns])
1517 AT_KEYWORDS([render rendering])
1518 RENDER_WEAVE_6X6
1519 AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl
1520 +-+--
1521 |a|bc
1522 +-+-+
1523 |j|m|
1524 |k+-+
1525
1526 |k+-+
1527 |l|t|
1528 +-+u|
1529 |A|v|
1530 +-+-+
1531
1532 +---+
1533 |IJK|
1534 +-+-+
1535 |Q|RS
1536 +-+--
1537
1538 --+-+
1539 cd|e|
1540 +-+-+
1541 |nop|
1542 +---+
1543
1544 +-+--
1545 |w|xy
1546 +-+-+
1547 |B|E|
1548 |C+-+
1549
1550 |C+-+
1551 |D|L|
1552 +-+M|
1553 ST|N|
1554 --+-+
1555
1556 +-+-+
1557 |f|i|
1558 |g+-+
1559 |h|q|
1560 +-+r|
1561
1562 --+r|
1563 yz|s|
1564 +-+-+
1565 |FGH|
1566 +---+
1567
1568 +-+-+
1569 |O|P|
1570 +-+-+
1571 |U|V|
1572 +-+-+
1573 ])
1574 AT_CLEANUP
1575
1576 AT_SETUP([double break 8x8, with joins, left and right headers])
1577 AT_KEYWORDS([render rendering])
1578 RENDER_8X8([1 1 0 0])
1579 AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
1580 +-+-+-+-+-+-+
1581 |a|b|c|d|e|h|
1582 +-+-+-+-+-+-+
1583 |i|jkl|m|n|t|
1584 +-+-+-+-+-+-+
1585 |u|v|wxy|z|D|
1586 +-+-+-+-+-+-+
1587 |E|F|I|JKL|P|
1588 +-+G+-+---+-+
1589 |Q|H|R|UVW|Y|
1590 +-+-+S+-+-+-+
1591 |Z|0|T|3|4|8|
1592 +-+1+-+-+-+-+
1593
1594 +-+1+---+-+-+
1595 |9|2|abc|d|h|
1596 +-+-+-+-+-+-+
1597 |i|j|k|l|m|p|
1598 +-+-+-+-+-+-+
1599
1600 +-+--+-+-+
1601 |a| f|g|h|
1602 +-+--+-+-+
1603 |i|op|q|t|
1604 +-+--+r+-+
1605 |u| A|s|D|
1606 +-+ B+-+-+
1607
1608 +-+ B+-+-+
1609 |E| C|M|P|
1610 +-+--+N+-+
1611 |Q| X|O|Y|
1612 +-+--+-+-+
1613 |Z|56|7|8|
1614 +-+--+-+-+
1615 |9| efg|h|
1616 +-+--+-+-+
1617 |i| n|o|p|
1618 +-+--+-+-+
1619 ])
1620 AT_CLEANUP
1621
1622 AT_SETUP([double break 8x8, with joins, top and bottom headers])
1623 AT_KEYWORDS([render rendering])
1624 RENDER_8X8([0 0 1 1])
1625 AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
1626 +-+-+-+-+-+-+
1627 |a|b|c|d|e|f|
1628 +-+-+-+-+-+-+
1629 |i|jkl|m|nop|
1630 +-+-+-+-+-+-+
1631 |u|v|wxy|z|A|
1632 +-+-+-+-+-+B|
1633 |E|F|I|JKL|C|
1634 +-+G+-+---+-+
1635 |Q|H|R|UVW|X|
1636 +-+-+-+-+-+-+
1637 |i|j|k|l|m|n|
1638 +-+-+-+-+-+-+
1639
1640 +-+-+-+-+-+-+
1641 |a|b|c|d|e|f|
1642 +-+-+-+-+-+-+
1643 |Z|0|S|3|456|
1644 | |1|T| |   |
1645 +-+2+-+-+-+-+
1646 |9| |abc|d|ef
1647 +-+-+-+-+-+-+
1648 |i|j|k|l|m|n|
1649 +-+-+-+-+-+-+
1650
1651 +-+-+
1652 |g|h|
1653 +-+-+
1654 |q|t|
1655 |r+-+
1656 |s|D|
1657 +-+-+
1658 |M|P|
1659 |N+-+
1660 |O|Y|
1661 +-+-+
1662 |o|p|
1663 +-+-+
1664
1665 +-+-+
1666 |g|h|
1667 +-+-+
1668 |7|8|
1669 | | |
1670 +-+-+
1671 fg|h|
1672 +-+-+
1673 |o|p|
1674 +-+-+
1675 ])
1676 AT_CLEANUP
1677
1678 AT_SETUP([double break 8x8, with joins, all headers])
1679 AT_KEYWORDS([render rendering])
1680 RENDER_8X8([1 1 1 1])
1681 AT_CHECK([render-test input --width=14 --length=14], [0], [dnl
1682 +-+-+-+-+-+-+
1683 |a|b|c|d|e|h|
1684 +-+-+-+-+-+-+
1685 |i|jkl|m|n|t|
1686 +-+-+-+-+-+-+
1687 |u|v|wxy|z|D|
1688 +-+-+-+-+-+-+
1689 |E|F|I|JKL|P|
1690 +-+G+-+---+-+
1691 |Q|H|R|UVW|Y|
1692 +-+-+-+-+-+-+
1693 |i|j|k|l|m|p|
1694 +-+-+-+-+-+-+
1695
1696 +-+-+-+-+-+-+
1697 |a|b|c|d|e|h|
1698 +-+-+-+-+-+-+
1699 |Z|0|S|3|4|8|
1700 | |1|T| | | |
1701 +-+2+-+-+-+-+
1702 |9| |abc|d|h|
1703 +-+-+-+-+-+-+
1704 |i|j|k|l|m|p|
1705 +-+-+-+-+-+-+
1706
1707 +-+--+-+-+
1708 |a| f|g|h|
1709 +-+--+-+-+
1710 |i|op|q|t|
1711 +-+--+r+-+
1712 |u| A|s|D|
1713 +-+ B+-+-+
1714 |E| C|M|P|
1715 +-+--+N+-+
1716 |Q| X|O|Y|
1717 +-+--+-+-+
1718 |i| n|o|p|
1719 +-+--+-+-+
1720
1721 +-+--+-+-+
1722 |a| f|g|h|
1723 +-+--+-+-+
1724 |Z|56|7|8|
1725 | |  | | |
1726 +-+--+-+-+
1727 |9| efg|h|
1728 +-+--+-+-+
1729 |i| n|o|p|
1730 +-+--+-+-+
1731 ])
1732 AT_CLEANUP
1733
1734 AT_SETUP([double break joined cells too big for page])
1735 AT_KEYWORDS([render rendering])
1736 AT_DATA([input], [7 7
1737 @a
1738 @b
1739 @c
1740 @d
1741 @e
1742 @f
1743 @g
1744 @h
1745 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.
1746 @i
1747 @j
1748 @k
1749 @l
1750 @m
1751 ])
1752 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
1753 +-+--+--+---+
1754 |a| b| c|  d|
1755 +-+--+--+---+
1756 |h|       The
1757 | |        su
1758 +-+    determ
1759 |i|       han
1760 | |missing va
1761 | |If INCLUDE
1762 +-+ then user
1763 |j|        va
1764 | |   include
1765 | | calculati
1766 +-+ NOINCLUDE
1767
1768 +-+ NOINCLUDE
1769 |k|      whic
1770 | |
1771 | |      user
1772 +-+        va
1773 |l|         e
1774 | |
1775 | |
1776 +-+
1777 |m|
1778 | |
1779 +-+----------
1780
1781 +--+--+--+
1782 | e| f| g|
1783 +--+--+--+
1784 e MISSING|
1785 ubcommand|
1786 mines the|
1787 ndling of|
1788 ariables.|
1789 E is set,|
1790 r‑missing|
1791 alues are|
1792 ed in the|
1793 ions.  If|
1794 E is set,|
1795
1796 E is set,|
1797 ch is the|
1798  default,|
1799 r‑missing|
1800 alues are|
1801 excluded.|
1802          |
1803          |
1804          |
1805          |
1806          |
1807 ---------+
1808 ])
1809 AT_CLEANUP
1810 \f
1811 AT_BANNER([output rendering -- problematic procedures])
1812
1813 dnl LIST used to put columns right up next to each other without any
1814 dnl intervening space, so this checks for regression.
1815 AT_SETUP([LIST puts space between columns])
1816 AT_KEYWORDS([render rendering])
1817 AT_DATA([list.sps], [dnl
1818 DATA LIST LIST NOTABLE /x y z (F1.0).
1819 BEGIN DATA.
1820 1 2 3
1821 4 5 6
1822 7 8 9
1823 END DATA.
1824 LIST.
1825 ])
1826 AT_CHECK([pspp list.sps], [0], [dnl
1827 Data List
1828 x y z
1829 -----
1830 1 2 3
1831 4 5 6
1832 7 8 9
1833 ])
1834 AT_CLEANUP
1835
1836 # Long string variables tend to end in lots of spaces.  The ASCII
1837 # driver didn't handle this very well: it would essentially produce
1838 # one blank line in a cell for each trailing space.  This test
1839 # checks for regression.  See bug #38672.
1840 AT_SETUP([ASCII driver renders end of line spaces reasonably])
1841 AT_KEYWORDS([render rendering])
1842 AT_DATA([input], [dnl
1843 3 3
1844 @a
1845 @b
1846 @xyzzy                                          @&t@
1847 @d
1848 @e
1849 @f
1850 @g
1851 @h
1852 @i
1853 ])
1854 AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
1855 +-+-+-----+
1856 |a|b|xyzzy|
1857 +-+-+-----+
1858 |d|e|    f|
1859 +-+-+-----+
1860 |g|h|    i|
1861 +-+-+-----+
1862 ])
1863 AT_CLEANUP
1864
1865 # There was a bug that, when multiple cells spanned a single column
1866 # (or row), only the dimensions of the cell nearest the bottom of the
1867 # table were actually considered.  This checks for regression.  (This
1868 # problem was most easily observed with SYSFILE INFO, which uses lots
1869 # of spanned cells).
1870 #
1871 # Without the fix, the output looks like this:
1872 # +-------+
1873 # | A long|
1874 # |   text|
1875 # |string.|
1876 # +-------+
1877 # |shorter|
1878 AT_SETUP([multiple spanned cells all contribute to dimensions])
1879 AT_KEYWORDS([render rendering])
1880 AT_DATA([input], [dnl
1881 2 2
1882 1*2 @A long text string.
1883 1*2 @shorter
1884 ])
1885 AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl
1886 +-------------------+
1887 |A long text string.|
1888 +-------------------+
1889 |            shorter|
1890 +-------------------+
1891 ])
1892 AT_CLEANUP