1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017, 2020 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%,1,100.0%
54 Table: X × Yabbadabbadoo
55 ,,,Yabbadabbadoo,,,,,,,Total
56 ,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00,
57 X,1.00,Count,0,0,0,0,0,0,0,0
58 ,2.00,,0,0,0,0,0,0,0,0
59 ,3.00,,0,0,0,0,0,0,0,0
60 ,4.00,,0,0,0,0,1,0,0,1
61 ,5.00,,0,0,0,0,0,0,0,0
62 ,6.00,,0,0,0,0,0,0,0,0
63 ,7.00,,0,0,0,0,0,0,0,0
64 Total,,,0,0,0,0,1,0,0,1
69 AT_SETUP([variable parser crash])
71 AT_DATA([crash.sps], [dnl
78 AT_CHECK([pspp -O format=txt crash.sps], [1], [ignore])