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/>.
16 dnl AT_BANNER([variable display attributes])
18 AT_SETUP([variable display attribute commands])
19 AT_DATA([var-display.sps], [dnl
20 DATA LIST FREE /x y z.
21 VARIABLE ALIGNMENT x (LEFT)/y (RIGHT)/z (CENTER).
22 VARIABLE WIDTH x (10)/y (12)/z (14).
23 VARIABLE LEVEL x (SCALE)/y (ORDINAL)/z (NOMINAL).
24 VARIABLE ROLE /TARGET x /BOTH y /NONE z.
27 AT_CHECK([pspp -o pspp.csv var-display.sps])
28 AT_CHECK([cat pspp.csv], [0], [dnl
29 Variable,Description,Position
33 Display Alignment: Left
38 Display Alignment: Right
43 Display Alignment: Center
49 AT_BANNER([VARIABLE LABELS])
51 AT_SETUP([variable labels])
53 dnl The following test is to make sure the TVARS command works and that
54 dnl variables are displayed accordingly.
55 AT_DATA([var-labels.sps], [dnl
56 DATA LIST LIST NOTABLE /x * y *.
64 * While no labels have been set, the TVARS is irrelevant.
74 VARIABLE LABEL x 'foo' y 'bar'.
76 * Now, the TVARS setting should have effect
88 AT_CHECK([pspp -O format=csv var-labels.sps], [0],[dnl
89 Table: Valid cases = 4; cases with missing value(s) = 0.
90 Variable,N,Mean,Std Dev,Minimum,Maximum
91 x,4,2.50,1.29,1.00,4.00
92 y,4,250.00,129.10,100.00,400.00
94 Table: Valid cases = 4; cases with missing value(s) = 0.
95 Variable,N,Mean,Std Dev,Minimum,Maximum
96 x,4,2.50,1.29,1.00,4.00
97 y,4,250.00,129.10,100.00,400.00
99 Table: Valid cases = 4; cases with missing value(s) = 0.
100 Variable,N,Mean,Std Dev,Minimum,Maximum
101 x,4,2.50,1.29,1.00,4.00
102 y,4,250.00,129.10,100.00,400.00
104 Table: Valid cases = 4; cases with missing value(s) = 0.
105 Variable,N,Mean,Std Dev,Minimum,Maximum
106 x,4,2.50,1.29,1.00,4.00
107 y,4,250.00,129.10,100.00,400.00
109 Table: Valid cases = 4; cases with missing value(s) = 0.
110 Variable,N,Mean,Std Dev,Minimum,Maximum
111 foo,4,2.50,1.29,1.00,4.00
112 bar,4,250.00,129.10,100.00,400.00
114 Table: Valid cases = 4; cases with missing value(s) = 0.
115 Variable,N,Mean,Std Dev,Minimum,Maximum
116 foo (x),4,2.50,1.29,1.00,4.00
117 bar (y),4,250.00,129.10,100.00,400.00