render: Add comments to tests.
[pspp] / tests / output / render.at
index 230299223f349bb62738cbf2cac6ae34daa8043a..721c2cd481da2699d0160e74528c243c7d65753a 100644 (file)
@@ -1,3 +1,16 @@
+# +-+---+-+-+-+
+# |a|bcd|e|f|i|
+# +-+-+-+-+g+-+
+# |j|m|nop|h|q|
+# |k+-+-+-+-+r|
+# |l|t|w|xyz|s|
+# +-+u+-+-+-+-+
+# |A|v|B|E|FGH|
+# +-+-+C+-+-+-+
+# |IJK|D|L|O|P|
+# +-+-+-+M+-+-+
+# |Q|RST|N|U|V|
+# +-+---+-+-+-+
 m4_define([RENDER_WEAVE_6X6],
   [AT_DATA([input], [6 6 $1
 @a
@@ -26,6 +39,23 @@ m4_define([RENDER_WEAVE_6X6],
 @V
 ])])
 
+# +-+-+-+-+-+-+-+-+
+# |a|b|c|d|e|f|g|h|
+# +-+-+-+-+-+-+-+-+
+# |i|jkl|m|nop|q|t|
+# +-+-+-+-+-+-+r+-+
+# |u|v|wxy|z|A|s|D|
+# +-+-+-+-+-+B+-+-+
+# |E|F|I|JKL|C|M|P|
+# +-+G+-+---+-+N+-+
+# |Q|H|R|UVW|X|O|Y|
+# +-+-+S+-+-+-+-+-+
+# |Z|0|T|3|456|7|8|
+# +-+1+-+-+-+-+-+-+
+# |9|2|abc|d|efg|h|
+# +-+-+-+-+-+-+-+-+
+# |i|j|k|l|m|n|o|p|
+# +-+-+-+-+-+-+-+-+
 m4_define([RENDER_8X8],
   [AT_DATA([input], [8 8 $1
 @a
@@ -1831,3 +1861,32 @@ AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl
 +-+-+-----+
 ])
 AT_CLEANUP
+
+# There was a bug that, when multiple cells spanned a single column
+# (or row), only the dimensions of the cell nearest the bottom of the
+# table were actually considered.  This checks for regression.  (This
+# problem was most easily observed with SYSFILE INFO, which uses lots
+# of spanned cells).
+#
+# Without the fix, the output looks like this:
+# +-------+
+# | A long|
+# |   text|
+# |string.|
+# +-------+
+# |shorter|
+AT_SETUP([multiple spanned cells all contribute to dimensions])
+AT_KEYWORDS([render rendering])
+AT_DATA([input], [dnl
+2 2
+1*2 @A long text string.
+1*2 @shorter
+])
+AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl
++-------------------+
+|A long text string.|
++-------------------+
+|            shorter|
++-------------------+
+])
+AT_CLEANUP