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([DATASET commands])
19 AT_SETUP([DATASET COPY])
20 AT_DATA([dataset.pspp], [dnl
22 DATA LIST NOTABLE /x 1.
34 DATA LIST NOTABLE /y 1.
43 DATASET ACTIVATE clone.
47 DATASET ACTIVATE initial.
54 DATASET ACTIVATE clone.
59 DATASET CLOSE initial.
62 AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl
72 initial (active dataset)
76 clone (active dataset)
90 initial (active dataset)
104 Table: Open datasets.
106 unnamed dataset (active dataset)
109 Table: Open datasets.
111 unnamed dataset (active dataset)
115 AT_SETUP([DATASET DECLARE])
116 AT_DATA([dataset.pspp], [dnl
117 DATASET DECLARE second.
119 DATA LIST NOTABLE/x 1.
124 DATASET ACTIVATE second.
128 AT_CHECK([pspp -O format=csv dataset.pspp], [1], [dnl
129 Table: Open datasets.
131 unnamed dataset (active dataset)
138 Table: Open datasets.
140 second (active dataset)
142 dataset.pspp:10: error: LIST: LIST is allowed only after the active dataset has been defined.
146 AT_SETUP([DATASET NAME deletes duplicate name])
147 AT_DATA([dataset.pspp], [dnl
157 AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl
158 Table: Open datasets.
164 Table: Open datasets.
170 AT_SETUP([DATASET ACTIVATE deletes unnamed dataset])
171 AT_DATA([dataset.pspp], [dnl
178 AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl
179 Table: Open datasets.
181 unnamed dataset (active dataset)
184 Table: Open datasets.
190 AT_SETUP([DATASET ACTIVATE executes pending transformations])
191 AT_DATA([dataset.pspp], [dnl
193 DATASET DECLARE another.
196 DATA LIST NOTABLE /x 1.
198 DATASET ACTIVATE another.
209 DATASET ACTIVATE one.
212 AT_CHECK([pspp -O format=csv dataset.pspp], [1], [dnl
213 Table: Open datasets.
228 dataset.pspp:16: error: LIST: LIST is allowed only after the active dataset has been defined.
240 AT_SETUP([DATASET CLOSE])
241 AT_DATA([dataset.pspp], [dnl
256 DATASET DECLARE that.
257 DATASET DECLARE theother.
258 DATASET DECLARE yetanother.
264 DATASET DECLARE that.
265 DATASET DECLARE theother.
266 DATASET DECLARE yetanother.
271 AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl
272 Table: Open datasets.
274 unnamed dataset (active dataset)
276 Table: Open datasets.
278 unnamed dataset (active dataset)
280 Table: Open datasets.
282 this (active dataset)
284 Table: Open datasets.
286 unnamed dataset (active dataset)
288 Table: Open datasets.
290 this (active dataset)
292 Table: Open datasets.
294 unnamed dataset (active dataset)
296 Table: Open datasets.
298 unnamed dataset (active dataset)
303 Table: Open datasets.
305 unnamed dataset (active dataset)
307 Table: Open datasets.
311 this (active dataset)
314 Table: Open datasets.
316 unnamed dataset (active dataset)