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 parser])
19 dnl This program tests that both long and short variable names are parsed OK.
20 dnl It use CROSSTABS, since its TABLES subcommand exercises the array var set
22 AT_SETUP([Long variable names])
23 AT_DATA([longvars.sps], [dnl
24 DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * .
32 VARIABLES X (1,7) Yabbadabbadoo (1,7)
33 /TABLES X BY Yabbadabbadoo.
35 AT_CHECK([pspp -o pspp.csv longvars.sps])
36 AT_CHECK([cat pspp.csv], [0], [dnl
37 Table: Reading free-form data from INLINE.
45 AlphaBetaGamma,B,X,Yabbadabbadoo
50 ,Valid,,Missing,,Total,
51 ,N,Percent,N,Percent,N,Percent
52 X * Yabbadabbadoo,1,100.0%,0,0.0%,1,100.0%
54 Table: X * Yabbadabbadoo [[count]].
56 X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total
57 1.00,.00,.00,.00,.00,.00,.00,.00,.00
58 2.00,.00,.00,.00,.00,.00,.00,.00,.00
59 3.00,.00,.00,.00,.00,.00,.00,.00,.00
60 4.00,.00,.00,.00,.00,1.00,.00,.00,1.00
61 5.00,.00,.00,.00,.00,.00,.00,.00,.00
62 6.00,.00,.00,.00,.00,.00,.00,.00,.00
63 7.00,.00,.00,.00,.00,.00,.00,.00,.00
64 Total,.00,.00,.00,.00,1.00,.00,.00,1.00