T-TEST: Fix use-after-free with TEMPORARY and independent samples.
[pspp-builds.git] / tests / language / lexer / variable-parser.at
1 AT_BANNER([Variable parser])
2
3 dnl This program tests that both long and short variable names are parsed OK.
4 dnl It use CROSSTABS, since its TABLES subcommand exercises the array var set 
5 dnl feature.
6 AT_SETUP([Long variable names])
7 AT_DATA([longvars.sps], [dnl
8 DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * .
9 BEGIN DATA.
10 2 3 4 5
11 END DATA.
12
13 LIST.
14
15 CROSSTABS 
16         VARIABLES X (1,7) Yabbadabbadoo (1,7) 
17         /TABLES X BY Yabbadabbadoo.
18 ])
19 AT_CHECK([pspp -o pspp.csv longvars.sps])
20 AT_CHECK([cat pspp.csv], [0], [dnl
21 Table: Reading free-form data from INLINE.
22 Variable,Format
23 AlphaBetaGamma,F8.0
24 B,F8.0
25 X,F8.0
26 Yabbadabbadoo,F8.0
27
28 Table: Data List
29 AlphaBetaGamma,B,X,Yabbadabbadoo
30 2.00,3.00,4.00,5.00
31
32 Table: Summary.
33 ,Cases,,,,,
34 ,Valid,,Missing,,Total,
35 ,N,Percent,N,Percent,N,Percent
36 X * Yabbadabbadoo,1,100.0%,0,0.0%,1,100.0%
37
38 Table: X * Yabbadabbadoo [[count]].
39 ,Yabbadabbadoo,,,,,,,
40 X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total
41 1.00,.0,.0,.0,.0,.0,.0,.0,.0
42 2.00,.0,.0,.0,.0,.0,.0,.0,.0
43 3.00,.0,.0,.0,.0,.0,.0,.0,.0
44 4.00,.0,.0,.0,.0,1.0,.0,.0,1.0
45 5.00,.0,.0,.0,.0,.0,.0,.0,.0
46 6.00,.0,.0,.0,.0,.0,.0,.0,.0
47 7.00,.0,.0,.0,.0,.0,.0,.0,.0
48 Total,.0,.0,.0,.0,1.0,.0,.0,1.0
49 ])
50 AT_CLEANUP