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/>.
19 m4_define([LOOP_DATA], [dnl
20 data list notable /x 1 y 2 z 3.
29 AT_SETUP([LOOP with index])
30 AT_DATA([loop.sps], [dnl
38 AT_CHECK([pspp -o pspp.csv loop.sps])
39 AT_CHECK([cat pspp.csv], [0], [dnl
64 AT_SETUP([LOOP with IF condition])
65 AT_DATA([loop.sps], [dnl
75 AT_CHECK([pspp -o pspp.csv loop.sps])
76 AT_CHECK([cat pspp.csv], [0], [dnl
101 AT_SETUP([LOOP with END IF condition])
102 AT_DATA([loop.sps], [dnl
112 AT_CHECK([pspp -o pspp.csv loop.sps])
113 AT_CHECK([cat pspp.csv], [0], [dnl
140 AT_SETUP([LOOP with index and IF based on index])
141 AT_DATA([loop.sps], [dnl
143 loop #m=x to y by z if #m < 4.
149 AT_CHECK([pspp -o pspp.csv loop.sps])
150 AT_CHECK([cat pspp.csv], [0], [dnl
169 AT_SETUP([LOOP with index and END IF based on index])
170 AT_DATA([loop.sps], [dnl
178 AT_CHECK([pspp -o pspp.csv loop.sps])
179 AT_CHECK([cat pspp.csv], [0], [dnl
202 AT_SETUP([LOOP with index and IF and END IF based on index])
203 AT_DATA([loop.sps], [dnl
205 loop #o=x to y by z if mod(#o,2) = 0.
211 AT_CHECK([pspp -o pspp.csv loop.sps])
212 AT_CHECK([cat pspp.csv], [0], [dnl
227 AT_SETUP([LOOP with no conditions containing BREAK])
228 AT_DATA([loop.sps], [dnl
241 AT_CHECK([pspp -o pspp.csv loop.sps])
242 AT_CHECK([cat pspp.csv], [0], [dnl
265 AT_SETUP([LOOP with no conditions that ends due to MXLOOPS])
266 AT_DATA([loop.sps], [dnl
276 AT_CHECK([pspp -o pspp.csv loop.sps])
277 AT_CHECK([cat pspp.csv], [0], [dnl