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([variable display attributes])
19 AT_SETUP([variable display attribute commands])
20 AT_DATA([var-display.sps], [dnl
21 DATA LIST FREE /x y z.
22 VARIABLE ALIGNMENT x (LEFT)/y (RIGHT)/z (CENTER).
23 VARIABLE WIDTH x (10)/y (12)/z (14).
24 VARIABLE LEVEL x (SCALE)/y (ORDINAL)/z (NOMINAL).
25 VARIABLE ROLE /TARGET x /BOTH y /NONE z.
28 AT_CHECK([pspp -o pspp.csv var-display.sps])
29 AT_CHECK([cat pspp.csv], [0], [dnl
31 Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format
32 x,1,Scale,Output,10,Left,F8.2,F8.2
33 y,2,Ordinal,Both,12,Right,F8.2,F8.2
34 z,3,Nominal,None,14,Center,F8.2,F8.2
39 AT_BANNER([VARIABLE LABELS])
41 AT_SETUP([variable labels])
43 dnl The following test is to make sure the TVARS command works and that
44 dnl variables are displayed accordingly.
45 AT_DATA([var-labels.sps], [dnl
46 DATA LIST LIST NOTABLE /x * y *.
54 * While no labels have been set, the TVARS is irrelevant.
64 VARIABLE LABEL x 'foo' y 'bar'.
66 * Now, the TVARS setting should have effect
78 AT_CHECK([pspp -o pspp.csv -o pspp.txt var-labels.sps])
79 AT_CHECK([cat pspp.csv], [0],[dnl
80 Table: Descriptive Statistics
81 ,N,Mean,Std Dev,Minimum,Maximum
82 x,4,2.50,1.29,1.00,4.00
83 y,4,250.00,129.10,100.00,400.00
84 Valid N (listwise),4,,,,
85 Missing N (listwise),0,,,,
87 Table: Descriptive Statistics
88 ,N,Mean,Std Dev,Minimum,Maximum
89 x,4,2.50,1.29,1.00,4.00
90 y,4,250.00,129.10,100.00,400.00
91 Valid N (listwise),4,,,,
92 Missing N (listwise),0,,,,
94 Table: Descriptive Statistics
95 ,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
98 Valid N (listwise),4,,,,
99 Missing N (listwise),0,,,,
101 Table: Descriptive Statistics
102 ,N,Mean,Std Dev,Minimum,Maximum
103 x,4,2.50,1.29,1.00,4.00
104 y,4,250.00,129.10,100.00,400.00
105 Valid N (listwise),4,,,,
106 Missing N (listwise),0,,,,
108 Table: Descriptive Statistics
109 ,N,Mean,Std Dev,Minimum,Maximum
110 foo,4,2.50,1.29,1.00,4.00
111 bar,4,250.00,129.10,100.00,400.00
112 Valid N (listwise),4,,,,
113 Missing N (listwise),0,,,,
115 Table: Descriptive Statistics
116 ,N,Mean,Std Dev,Minimum,Maximum
117 x foo,4,2.50,1.29,1.00,4.00
118 y bar,4,250.00,129.10,100.00,400.00
119 Valid N (listwise),4,,,,
120 Missing N (listwise),0,,,,