1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AT_BANNER([ASCII driver -- rendering corner cases])
19 AT_SETUP([ASCII driver overwriting single-width text])
20 AT_KEYWORDS([render rendering])
22 ## overwriting rest of line
26 # emphasized over plain
29 # plain over emphasized
32 # emphasized over emphasized
36 ## overwriting partial line
41 # emphasized over plain
45 # plain over emphasized
49 # emphasized over emphasized
54 ## overwriting rest of line with double-width characters
58 # emphasized over plain
61 # plain over emphasized
64 # emphasized over emphasized
68 ## overwriting partial line with double-width characters
73 # emphasized over plain
77 # plain over emphasized
81 # emphasized over emphasized
86 AT_CHECK([ascii-test --emph=none input], [0], [dnl
107 AT_CHECK([ascii-test --emph=bold input], [0], [dnl
116 S
\bSt
\btU
\bUV
\bVW
\bWx
\bx
126 か
\bかk
\bki
\biく
\bくけ
\bけk
\bko
\bo
128 AT_CHECK([ascii-test --emph=underline input], [0], [dnl
137 _
\bS_
\bt_
\bU_
\bV_
\bW_
\bx
147 _
\bか_
\bk_
\bi_
\bく_
\bけ_
\bk_
\bo
151 AT_SETUP([ASCII driver overwriting double-width text])
152 AT_KEYWORDS([render rendering])
153 AT_DATA([input], [dnl
154 ## overwrite rest of line, aligned double-width over double-width
158 # emphasized over plain
161 # plain over emphasized
164 # emphasized over emphasized
168 ## overwrite rest of line, misaligned double-width over double-width
172 # emphasized over plain
175 # plain over emphasized
178 # emphasized over emphasized
182 ## overwrite partial line, aligned double-width over double-width
187 # emphasized over plain
191 # plain over emphasized
195 # emphasized over emphasized
200 ## overwrite partial line, misaligned double-width over double-width
205 # emphasized over plain
209 # plain over emphasized
213 # emphasized over emphasized
218 ## overwrite rest of line, aligned single-width over double-width
222 # emphasized over plain
225 # plain over emphasized
228 # emphasized over emphasized
232 ## overwrite rest of line, misaligned single-width over double-width
236 # emphasized over plain
239 # plain over emphasized
242 # emphasized over emphasized
246 ## overwrite partial line, aligned single-width over double-width
251 # emphasized over plain
255 # plain over emphasized
259 # emphasized over emphasized
264 ## overwrite partial line, misaligned single-width over double-width
269 # emphasized over plain
273 # plain over emphasized
277 # emphasized over emphasized
282 AT_CHECK([ascii-test --emph=none input], [0], [dnl
323 AT_CHECK([ascii-test --emph=bold input], [0], [dnl
345 あk
\bki
\bik
\bku
\buk
\bko
\bo
347 あ
\bあk
\bki
\bik
\bku
\buk
\bko
\bo
350 あ?k
\bki
\bik
\bku
\buk
\bko
\bo
352 あ
\bあ?k
\bki
\bik
\bku
\buk
\bko
\bo
355 k
\bka
\baいk
\bku
\buk
\bke
\beお
357 k
\bka
\baい
\bいk
\bku
\buk
\bke
\beお
\bお
360 ?a
\baい?k
\bku
\buk
\bke
\be?さ
362 ?a
\baい
\bい?k
\bku
\buk
\bke
\be?さ
\bさ
364 AT_CHECK([ascii-test --emph=underline input], [0], [dnl
386 あ_
\bk_
\bi_
\bk_
\bu_
\bk_
\bo
388 _
\bあ_
\bk_
\bi_
\bk_
\bu_
\bk_
\bo
391 あ?_
\bk_
\bi_
\bk_
\bu_
\bk_
\bo
393 _
\bあ?_
\bk_
\bi_
\bk_
\bu_
\bk_
\bo
396 _
\bk_
\baい_
\bk_
\bu_
\bk_
\beお
398 _
\bk_
\ba_
\bい_
\bk_
\bu_
\bk_
\be_
\bお
401 ?_
\baい?_
\bk_
\bu_
\bk_
\be?さ
403 ?_
\ba_
\bい?_
\bk_
\bu_
\bk_
\be?_
\bさ
407 AT_SETUP([ASCII driver overwriting combining characters])
408 AT_KEYWORDS([render rendering])
409 AT_DATA([input], [dnl
410 ## overwriting rest of line, ordinary over combining
414 # emphasized over plain
417 # plain over emphasized
420 # emphasized over emphasized
424 ## overwriting rest of line, combining over ordinary
428 # emphasized over plain
431 # plain over emphasized
434 # emphasized over emphasized
438 ## overwriting partial line, ordinary over combining
443 # emphasized over plain
447 # plain over emphasized
451 # emphasized over emphasized
456 ## overwriting partial line, combining over ordinary
461 # emphasized over plain
465 # plain over emphasized
469 # emphasized over emphasized
474 AT_CHECK([ascii-test --emph=none input], [0], [dnl
495 AT_CHECK([ascii-test --emph=bold input], [0], [dnl
509 a
\bae
\béi
\bio
\bou
\buy
\bẙ
512 a
\bàei
\bîo
\bo̧u
\bũy
514 a
\bàe
\bei
\bîo
\bo̧u
\bũy
\by
516 AT_CHECK([ascii-test --emph=underline input], [0], [dnl
530 _
\ba_
\bé_
\bi_
\bo_
\bu_
\bẙ
533 _
\bàe_
\bî_
\bo̧_
\bũy
535 _
\bà_
\be_
\bî_
\bo̧_
\bũ_
\by
539 AT_SETUP([ASCII driver u8_line_set_length])
540 AT_KEYWORDS([render rendering])
541 AT_DATA([input], [dnl
566 AT_CHECK([ascii-test input], [0], [dnl
580 AT_SETUP([ASCII driver syntax printback])
581 AT_DATA([ascii.sps], [dnl
583 DATA LIST LIST /x * y * a (a23).
593 /STATISTICS=COEFF R ANOVA.
595 AT_CHECK([pspp ascii.sps], [0], [dnl
598 DATA LIST LIST /x * y * a (a23).
600 Reading free-form data from INLINE.
618 ascii.sps:11: warning: REGRESSION: a is not a numeric variable. It will not be
619 included in the variable list.
622 /STATISTICS=COEFF R ANOVA.
627 AT_SETUP([ASCII unicode box chars])
629 AT_DATA([uc.sps], [dnl
631 DATA LIST NOTABLE LIST /x * .
642 AT_CHECK([pspp -O box=unicode uc.sps], [0], [dnl
643 Descriptive Statistics
644 ╭────────────────────┬─┬──────┬───────┬───────┬───────╮
645 │ │N│ Mean │Std Dev│Minimum│Maximum│
646 ├────────────────────┼─┼──────┼───────┼───────┼───────┤
647 │x │3│2.0000│ 1.0000│ 1.0000│ 3.0000│
648 │Valid N (listwise) │3│ │ │ │ │
649 │Missing N (listwise)│0│ │ │ │ │
650 ╰────────────────────┴─┴──────┴───────┴───────┴───────╯
655 AT_SETUP([ASCII crash on empty line])
657 AT_DATA([print.sps], [dnl
658 data list notable /x y 1-2.
668 AT_CHECK([pspp print.sps], [0], [ignore])
674 dnl A crash has been observed when the first character
675 dnl of a string is U+0008
676 AT_SETUP([ASCII crash on non-printables])
678 AT_DATA([nonprint.sps], [dnl
679 DATA LIST FREE /s8 (a8).
687 AT_CHECK([pspp nonprint.sps], [0], [ignore])