output: Introduce pivot tables.
[pspp] / tests / output / ascii.at
index 3c9243e7d2b09bacea503881041f9f1c069d18dd..934de64662b557c3c23e3f7c4bd220f3fdf86cfc 100644 (file)
@@ -1,3 +1,19 @@
+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+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 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 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
 AT_BANNER([ASCII driver -- rendering corner cases])
 
 AT_SETUP([ASCII driver overwriting single-width text])
@@ -520,6 +536,47 @@ _\bà_\be_\bî_\bo̧_\bũ_\by
 ])
 AT_CLEANUP
 
+AT_SETUP([ASCII driver u8_line_set_length])
+AT_KEYWORDS([render rendering])
+AT_DATA([input], [dnl
+0 0 0 àéî
+0 1 0 àéî
+0 2 0 àéî
+0 3 0 àéî
+0 4 0 àéî
+set-length 0 4
+set-length 1 3
+set-length 2 2
+set-length 3 1
+set-length 4 0
+
+0 5 0 あい
+0 6 0 あい
+0 7 0 あい
+0 8 0 あい
+0 9 0 あい
+0 10 0 あい
+set-length 5 5
+set-length 6 4
+set-length 7 3
+set-length 8 2
+set-length 9 1
+set-length 10 0
+])
+AT_CHECK([render-test --draw-mode input], [0], [dnl
+àéî
+àéî
+àé
+à
+
+あい
+あい
+あ?
+あ
+?
+])
+AT_CLEANUP
+
 AT_SETUP([ASCII driver Unicode box characters])
 AT_KEYWORDS([render rendering])
 AT_DATA([input], [3 3
@@ -539,3 +596,95 @@ AT_CHECK([render-test --box=unicode input], [0], [dnl
 ╰─┴───╯
 ])
 AT_CLEANUP
+
+AT_SETUP([ASCII driver syntax printback])
+AT_DATA([ascii.sps], [dnl
+SET PRINTBACK=ON.
+DATA LIST LIST /x * y * a (a23).
+BEGIN DATA.
+1 11 One
+2 22 Two
+3 33 Three
+END DATA.
+
+REGRESSION
+/VARIABLES= a
+/DEPENDENT= x y
+/STATISTICS=COEFF R ANOVA.
+])
+AT_CHECK([pspp ascii.sps], [0], [dnl
+SET PRINTBACK=ON.
+
+DATA LIST LIST /x * y * a (a23).
+
+Reading free-form data from INLINE.
++--------+------+
+|Variable|Format|
++--------+------+
+|x       |F8.0  |
+|y       |F8.0  |
+|a       |A23   |
++--------+------+
+
+BEGIN DATA.
+1 11 One
+2 22 Two
+3 33 Three
+END DATA.
+
+REGRESSION
+/VARIABLES= a
+
+ascii.sps:11: warning: REGRESSION: a is not a numeric variable.  It will not be
+included in the variable list.
+
+/DEPENDENT= x y
+/STATISTICS=COEFF R ANOVA.
+])
+
+AT_CLEANUP
+
+AT_SETUP([ASCII unicode box chars])
+
+AT_DATA([uc.sps], [dnl
+SET FORMAT=F8.4.
+DATA LIST NOTABLE LIST /x * .
+BEGIN DATA.
+1
+2
+3
+END DATA.
+
+DESCRIPTIVES X.
+])
+
+
+AT_CHECK([pspp -O box=unicode uc.sps], [0], [dnl
+                 Descriptive Statistics
+╭────────────────────┬─┬──────┬───────┬───────┬───────╮
+│                    │N│ Mean │Std Dev│Minimum│Maximum│
+├────────────────────┼─┼──────┼───────┼───────┼───────┤
+│x                   │3│2.0000│ 1.0000│ 1.0000│ 3.0000│
+│Valid N (listwise)  │3│      │       │       │       │
+│Missing N (listwise)│0│      │       │       │       │
+╰────────────────────┴─┴──────┴───────┴───────┴───────╯
+])
+
+AT_CLEANUP
+
+AT_SETUP([ASCII crash on empty line])
+
+AT_DATA([print.sps], [dnl
+data list notable /x y 1-2.
+begin data.
+12
+end data.
+
+print.
+
+execute.
+])
+
+AT_CHECK([pspp print.sps], [0], [ignore])
+
+AT_CLEANUP