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([SYSFILE INFO])
19 AT_SETUP([SYSFILE INFO])
20 AT_DATA([sysfile-info.sps], [dnl
21 DATA LIST LIST /x * name (a10) .
27 SAVE OUTFILE='pro.sav'.
29 sysfile info file='pro.sav'.
31 AT_CHECK([pspp -o pspp.csv sysfile-info.sps])
33 [sed -e '/^Created:,/d' \
35 -e '/^Integer Format:,/d' \
36 -e '/^Real Format:,/d' \
37 -e '/^Encoding:,/d' pspp.csv],
39 Table: Reading free-form data from INLINE.
48 Type:,SPSS System File
53 Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
54 x,1,,Scale,Input,8,Right,F8.2,F8.2,
55 name,2,,Nominal,Input,10,Left,A10,A10,
61 dnl DISPLAY DOCUMENTS is tested with commands for documents.
63 AT_SETUP([DISPLAY FILE LABEL])
64 AT_DATA([display.sps], [dnl
65 DATA LIST LIST NOTABLE /x * name (a10) .
69 FILE LABEL 'foo bar baz quux'.
72 AT_CHECK([pspp -O format=csv display.sps], [0], [dnl
73 The active dataset does not have a file label.
75 File label: foo bar baz quux
79 dnl DISPLAY VECTORS is tested with commands for vectors.
81 dnl DISPLAY ATTRIBUTES and @ATTRIBUTES are tested with commands for attributes.
83 AT_SETUP([DISPLAY SCRATCH])
84 AT_DATA([sysfile-info.sps], [dnl
85 DATA LIST LIST NOTABLE /x * name (a10) .
90 AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl
91 sysfile-info.sps:2: warning: DISPLAY: No variables to display.
99 AT_SETUP([DISPLAY INDEX])
100 AT_DATA([sysfile-info.sps], [dnl
101 DATA LIST LIST NOTABLE /x * name (a10) .
104 AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl
112 AT_SETUP([DISPLAY NAMES])
113 AT_DATA([sysfile-info.sps], [dnl
114 DATA LIST LIST NOTABLE /x * name (a10) .
117 AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl
125 AT_SETUP([DISPLAY LABELS])
126 AT_DATA([sysfile-info.sps], [dnl
127 DATA LIST LIST NOTABLE /x * name (a10) .
128 VARIABLE LABEL x 'variable one' name 'variable two'.
129 VALUE LABEL x 1 'asdf' 2 'jkl;'.
132 AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl
140 dnl DISPLAY VARIABLES Is tested in multiple places.