Add support for reading and writing SPV files.
[pspp] / tests / utilities / pspp-output.at
1 AT_BANNER([pspp-output])
2
3 AT_SETUP([pspp-output dir])
4 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv], [0], [dnl
5 - heading "Set" command "Set"
6 - heading "Title" command "Title"
7     - text "Page Title" command "Title"
8 - heading "Data List" command "Data List"
9     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
10 - heading "Begin Data" command "Begin Data"
11 - heading "List" command "List"
12     - table "Data List" command "List"
13 - heading "Frequencies" command "Frequencies"
14     - table "Statistics" command "Frequencies"
15     - table "v0" command "Frequencies" subtype "Frequencies"
16     - table "v1" command "Frequencies" subtype "Frequencies"
17     - table "v2" command "Frequencies" subtype "Frequencies"
18 - heading "Regression" command "Regression"
19     - table "Model Summary (v2)" command "Regression" subtype "Model Summary"
20     - table "ANOVA (v2)" command "Regression" subtype "ANOVA"
21     - table "Coefficients (v2)" command "Regression" subtype "Coefficients"
22 ])
23 AT_CLEANUP
24
25 AT_SETUP([pspp-output --select equal])
26 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --select=headings],
27   [0], [dnl
28 - heading "Set" command "Set"
29 - heading "Title" command "Title"
30 - heading "Data List" command "Data List"
31 - heading "Begin Data" command "Begin Data"
32 - heading "List" command "List"
33 - heading "Frequencies" command "Frequencies"
34 - heading "Regression" command "Regression"
35 ])
36 AT_CLEANUP
37
38 AT_SETUP([pspp-output --select unequal])
39 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --select=^headings],
40   [0], [dnl
41     - text "Page Title" command "Title"
42     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
43     - table "Data List" command "List"
44     - table "Statistics" command "Frequencies"
45     - table "v0" command "Frequencies" subtype "Frequencies"
46     - table "v1" command "Frequencies" subtype "Frequencies"
47     - table "v2" command "Frequencies" subtype "Frequencies"
48     - table "Model Summary (v2)" command "Regression" subtype "Model Summary"
49     - table "ANOVA (v2)" command "Regression" subtype "ANOVA"
50     - table "Coefficients (v2)" command "Regression" subtype "Coefficients"
51 ])
52 AT_CLEANUP
53
54 AT_SETUP([pspp-output --commands equal])
55 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --commands='reg*'],
56   [0], [dnl
57 - heading "Regression" command "Regression"
58     - table "Model Summary (v2)" command "Regression" subtype "Model Summary"
59     - table "ANOVA (v2)" command "Regression" subtype "ANOVA"
60     - table "Coefficients (v2)" command "Regression" subtype "Coefficients"
61 ])
62 AT_CLEANUP
63
64 AT_SETUP([pspp-output --commands unequal])
65 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --commands='^reg*'],
66   [0], [dnl
67 - heading "Set" command "Set"
68 - heading "Title" command "Title"
69     - text "Page Title" command "Title"
70 - heading "Data List" command "Data List"
71     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
72 - heading "Begin Data" command "Begin Data"
73 - heading "List" command "List"
74     - table "Data List" command "List"
75 - heading "Frequencies" command "Frequencies"
76     - table "Statistics" command "Frequencies"
77     - table "v0" command "Frequencies" subtype "Frequencies"
78     - table "v1" command "Frequencies" subtype "Frequencies"
79     - table "v2" command "Frequencies" subtype "Frequencies"
80 ])
81 AT_CLEANUP
82
83 AT_SETUP([pspp-output --subtypes equal])
84 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --subtypes='freq*'],
85   [0], [dnl
86     - table "v0" command "Frequencies" subtype "Frequencies"
87     - table "v1" command "Frequencies" subtype "Frequencies"
88     - table "v2" command "Frequencies" subtype "Frequencies"
89 ])
90 AT_CLEANUP
91
92 AT_SETUP([pspp-output --subtypes unequal])
93 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --subtypes='^freq*'],
94   [0], [dnl
95 - heading "Set" command "Set"
96 - heading "Title" command "Title"
97     - text "Page Title" command "Title"
98 - heading "Data List" command "Data List"
99     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
100 - heading "Begin Data" command "Begin Data"
101 - heading "List" command "List"
102     - table "Data List" command "List"
103 - heading "Frequencies" command "Frequencies"
104     - table "Statistics" command "Frequencies"
105 - heading "Regression" command "Regression"
106     - table "Model Summary (v2)" command "Regression" subtype "Model Summary"
107     - table "ANOVA (v2)" command "Regression" subtype "ANOVA"
108     - table "Coefficients (v2)" command "Regression" subtype "Coefficients"
109 ])
110 AT_CLEANUP
111
112 AT_SETUP([pspp-output --labels equal])
113 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --labels='v*'],
114   [0], [dnl
115     - table "v0" command "Frequencies" subtype "Frequencies"
116     - table "v1" command "Frequencies" subtype "Frequencies"
117     - table "v2" command "Frequencies" subtype "Frequencies"
118 ])
119 AT_CLEANUP
120
121 AT_SETUP([pspp-output --labels unequal])
122 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --labels='^data*'],
123   [0], [dnl
124 - heading "Set" command "Set"
125 - heading "Title" command "Title"
126     - text "Page Title" command "Title"
127     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
128 - heading "Begin Data" command "Begin Data"
129 - heading "List" command "List"
130 - heading "Frequencies" command "Frequencies"
131     - table "Statistics" command "Frequencies"
132     - table "v0" command "Frequencies" subtype "Frequencies"
133     - table "v1" command "Frequencies" subtype "Frequencies"
134     - table "v2" command "Frequencies" subtype "Frequencies"
135 - heading "Regression" command "Regression"
136     - table "Model Summary (v2)" command "Regression" subtype "Model Summary"
137     - table "ANOVA (v2)" command "Regression" subtype "ANOVA"
138     - table "Coefficients (v2)" command "Regression" subtype "Coefficients"
139 ])
140 AT_CLEANUP
141
142 AT_SETUP([pspp-output --instances])
143 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --instances=1],
144   [0], [dnl
145     - text "Page Title" command "Title"
146     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
147     - table "Data List" command "List"
148     - table "Statistics" command "Frequencies"
149     - table "Model Summary (v2)" command "Regression" subtype "Model Summary"
150 ])
151 AT_CLEANUP
152
153 AT_SETUP([pspp-output --instances=last])
154 AT_KEYWORDS([--instances last])
155 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --instances=last],
156   [0], [dnl
157     - text "Page Title" command "Title"
158     - table "Reading 1 record from INLINE." command "Data List" subtype "Fixed Data Records"
159     - table "Data List" command "List"
160     - table "v2" command "Frequencies" subtype "Frequencies"
161     - table "Coefficients (v2)" command "Regression" subtype "Coefficients"
162 ])
163 AT_CLEANUP
164
165 dnl XXX Currently PSPP doesn't output hidden items so no tests
166 dnl XXX for --show-hidden.
167
168 AT_SETUP([pspp-output --or])
169 AT_CHECK([pspp-output dir $srcdir/utilities/regress.spv --select=headings --or --labels='v*'],
170   [0], [dnl
171 - heading "Set" command "Set"
172 - heading "Title" command "Title"
173 - heading "Data List" command "Data List"
174 - heading "Begin Data" command "Begin Data"
175 - heading "List" command "List"
176 - heading "Frequencies" command "Frequencies"
177     - table "v0" command "Frequencies" subtype "Frequencies"
178     - table "v1" command "Frequencies" subtype "Frequencies"
179     - table "v2" command "Frequencies" subtype "Frequencies"
180 - heading "Regression" command "Regression"
181 ])
182 AT_CLEANUP
183
184 AT_SETUP([pspp-output convert])
185 AT_CHECK([pspp-output convert $srcdir/utilities/regress.spv -O format=csv - --subtypes='model*'], [0], [dnl
186 Table: Model Summary (v2)
187 R,R Square,Adjusted R Square,Std. Error of the Estimate
188 .96,.92,.91,1.49
189 ])
190 AT_CLEANUP