tests: Break off --draw-mode from render-test into ascii-test.
[pspp] / tests / output / render.at
index d5e971757af7d3fe982c95b95ba8dea68225ee98..67e3290b76cb552387c4c612894d8d97be8b285f 100644 (file)
@@ -1,19 +1,19 @@
 dnl PSPP - a program for statistical analysis.
 dnl Copyright (C) 2017 Free Software Foundation, Inc.
-dnl 
+dnl
 dnl This program is free software: you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation, either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
-dnl # +-+---+-+-+-+
+# +-+---+-+-+-+
 # |a|bcd|e|f|i|
 # +-+-+-+-+g+-+
 # |j|m|nop|h|q|
@@ -247,12 +247,12 @@ AT_CHECK([render-test --csv input], [0],
 |         h+-+----+
 |i[c][d][e]|   klm|
 +----------+------+
-[a] Approximation.
-[b] This is a very long footnote that will have to wrap from one line to the
-    next.  Let's see if the rendering engine does it acceptably.
-[c] One
-[d] Two
-[e] Three
+a. Approximation.
+b. This is a very long footnote that will have to wrap from one line to the
+next.  Let's see if the rendering engine does it acceptably.
+c. One
+d. Two
+e. Three
 ]])
 AT_CHECK([cat render.csv], [0],
 [[abc[a],,"d
@@ -314,13 +314,48 @@ AT_CLEANUP
 AT_SETUP([3 columns with many joined cells])
 AT_KEYWORDS([render rendering])
 AT_CAPTURE_FILE([input])
-AT_DATA([input], [3 19
-m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x
-])@1
-m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd
-])@20
+AT_DATA([input], [19 3
+a
+@1
+2*1 @11\nab\ncd
+b
+2*1 @2\nab\ncd
+c
+2*1 @12\nab\ncd
+d
+2*1 @3\nab\ncd
+e
+2*1 @13\nab\ncd
+f
+2*1 @4\nab\ncd
+g
+2*1 @14\nab\ncd
+h
+2*1 @5\nab\ncd
+i
+2*1 @15\nab\ncd
+j
+2*1 @6\nab\ncd
+k
+2*1 @16\nab\ncd
+l
+2*1 @7\nab\ncd
+m
+2*1 @17\nab\ncd
+n
+2*1 @8\nab\ncd
+o
+2*1 @18\nab\ncd
+p
+2*1 @9\nab\ncd
+q
+2*1 @19\nab\ncd
+r
+2*1 @10\nab\ncd
+s
+@20
 ])
-AT_CHECK([render-test --transpose input], [0], [dnl
+AT_CHECK([render-test input], [0], [dnl
  +--+--+
 a| 1|11|
  +--+ab|
@@ -520,6 +555,27 @@ AT_CHECK([render-test input], [0],[dnl
 +-----+------+----+
 ])
 AT_CLEANUP
+
+
+AT_SETUP([ASCII driver Unicode box characters])
+AT_KEYWORDS([render rendering])
+AT_DATA([input], [3 3
+1*2 @abc
+2*1 @d\ne\nf
+2*1 @g\nh\ni
+@j
+1*2 @klm
+])
+AT_CHECK([render-test --box=unicode input], [0], [dnl
+╭───┬─╮
+│abc│d│
+├─┬─┤e│
+│g│j│f│
+│h├─┴─┤
+│i│klm│
+╰─┴───╯
+])
+AT_CLEANUP
 \f
 AT_BANNER([output rendering -- horizontal page breaks])
 
@@ -945,7 +1001,7 @@ AT_DATA([expout], [dnl
 +-+u+-+-+
 |A|v|B|E|
 +-+-+C+-+
-|IJK|D|L|
+|K|D|L|
 +-+-+-+M|
 |Q|RST|N|
 +-+---+-+
@@ -993,7 +1049,7 @@ op|h|q|
 +-+-+r|
 |xyz|s|
 +-+-+-+
-|E|FGH|
+|E|H|
 +-+-+-+
 |L|O|P|
 |M+-+-+
@@ -1231,12 +1287,12 @@ AT_DATA([input], [WEAVE_8X8_2])
 AT_CHECK([render-test --width=8 input], [0],[dnl
 +---+--
 |abc|jk
-|def|  
+|def|
 |ghi+--
 |   |yz
 +-+-+BC
 |Q|V|EF
-|R| |  
+|R| |
 |S+-+-+
 |T|012|
 |U|345|
@@ -1264,10 +1320,10 @@ FG|W| Z|
 |9| | ab
 | | | de
 +-+-+ gh
-|opq|   
+|opq|
 |rst+---
 |uvw| JK
-|   |   
+|   |
 +---+--+
 | MNOPQ|
 | RSTUV|
@@ -1301,12 +1357,12 @@ KL|  |
 AT_CHECK([render-test -o mb0 --min-break=0 --width=8 input], [0],[dnl
 +---+--
 |abc|jk
-|def|  
+|def|
 |ghi+--
 |   |yz
 +-+-+BC
 |Q|V|EF
-|R| |  
+|R| |
 |S+-+-+
 |T|012|
 |U|345|
@@ -1334,10 +1390,10 @@ FG|W| Z|
 |9| | ab
 | | | de
 +-+-+ gh
-|opq|   
+|opq|
 |rst+---
 |uvw| JK
-|   |   
+|   |
 +---+--+
 | MNOPQ|
 | RSTUV|
@@ -1387,11 +1443,13 @@ LIST.
 ])
 AT_CHECK([pspp list.sps], [0], [dnl
 Data List
-x y z
------
-1 2 3
-4 5 6
-7 8 9
++-+-+-+
+|x|y|z|
++-+-+-+
+|1|2|3|
+|4|5|6|
+|7|8|9|
++-+-+-+
 ])
 AT_CLEANUP