text-item: Merge "title" and "subtitle" items into a new "page title".
[pspp] / tests / language / dictionary / split-file.at
1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
3 dnl 
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.
8 dnl 
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.
13 dnl 
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/>.
16 dnl
17 AT_BANNER([SPLIT FILE])
18
19 AT_SETUP([SPLIT FILE - basic test])
20 AT_DATA([split-file.sps], [dnl
21 title 'Test SPLIT FILE utility'.
22
23 data list notable /X 1 Y 2.
24 begin data.
25 12
26 16
27 17
28 19
29 15
30 14
31 27
32 20
33 26
34 25
35 28
36 29
37 24
38 end data.
39 split file by x.
40 list.
41 ])
42 AT_CHECK([pspp -o pspp.csv split-file.sps])
43 AT_CHECK([cat pspp.csv], [0], [dnl
44 Variable,Value,Label
45 X,1,
46
47 Table: Data List
48 X,Y
49 1,2
50 1,6
51 1,7
52 1,9
53 1,5
54 1,4
55
56 Variable,Value,Label
57 X,2,
58
59 Table: Data List
60 X,Y
61 2,7
62 2,0
63 2,6
64 2,5
65 2,8
66 2,9
67 2,4
68 ])
69 AT_CLEANUP
70
71
72
73
74
75 AT_SETUP([SPLIT FILE  - vs procedures])
76 AT_DATA([split-file.sps], [dnl
77
78 * This test is a compendium of those procedures which might
79 * have problems when run in conjunction with SPLITS.
80
81 data list list /a b c q g *.
82 begin data.
83 1 2 3     1  0 
84 4 5 6     0  0
85 7 8 9     1  0
86 10 11 12  0  1
87 13 14 15  1  1
88 end data.
89
90 split file by g.
91
92
93 * The commented out lines are ones which currently fail.
94
95 AGGREGATE outfile='foo' /break=c /X=sum(a). 
96 AUTORECODE variables = c into d .
97 COUNT e = c (1 2 3 4 5 6 7).
98 CROSSTABS a by b.
99 CORRELATIONS /VARIABLES = a b.
100 DELETE VARIABLES a.
101 DESCRIPTIVES e .
102 EXAMINE c by b.
103 EXPORT outfile='xxx'.
104 FACTOR /VARIABLES = b c d.
105 FILTER BY c.
106 FREQUENCIES b.
107 GLM c BY b.
108 GRAPH /HISTOGRAM = b .
109 GRAPH /SCATTERPLOT(BIVARIATE) = b with c by e .
110 GRAPH /BAR (GROUPED) = MEAN(b) by c by e.
111 GRAPH /BAR = COUNT BY  b.
112 LIST.
113 LOGISTIC REGRESSION q WITH b.
114 MEANS c b.
115 NPAR TESTS /MCNEMAR q.
116 ONEWAY c BY b.
117 QUICK CLUSTER b c.
118 RANK b c.
119 REGRESSION /VARIABLES = c /DEPENDENT = q.
120 RELIABILITY /VARIABLES = c b d. 
121 RENAME VARIABLES (b = bb).
122 ROC bb by q(1).
123 SAMPLE 0.9 .
124 SAVE outfile='xx.sav'.
125 SORT CASES by bb.
126 T-TEST /GROUP=q(0,1) /VARIABLES=bb.
127 USE ALL.
128 FLIP /VARIABLES = bb, c .
129
130 execute.
131 finish.
132 ])
133
134 AT_CHECK([pspp -O format=csv split-file.sps], [0],[ignore])
135
136 AT_CLEANUP