1 AT_BANNER([CHARTS Rudimentary run tests])
3 dnl Check that the charts work
4 dnl Currently, "work" means that the commands which
5 dnl should generate them, run without crashing.
6 dnl Better tests will come later (hopefully)
12 compute x = rv.normal (56, 3) + rv.uniform (1, 1).
13 compute y = rv.normal (6, 2) + rv.uniform (1, 2).
14 compute A = rv.uniform (-1, 1).
22 /plot = histogram, npplot spreadlevel(1)
36 AT_CHECK([pspp -o pspp.txt charts.sps], [0], [ignore])
42 data list list /fred * group * w *.
79 compute bert = fred + (group < 0.5) * 45.
80 compute charlie = fred + (group > 0.5) * 15.
83 ROC /fred bert charlie by group (0)
84 /plot = curve (reference).
88 AT_CHECK([pspp -o pspp.txt roc.sps], [0], [ignore])
101 compute vec(#v) = rv.normal (0, 45).
104 compute vec(#v) = vec (#v - 3) + rv.normal (0, 30).
112 factor /variables = all
118 AT_CHECK([pspp -o pspp.txt scree.sps], [0], [ignore])
123 AT_SETUP([Histogram])
124 AT_DATA([histogram.sps],[
125 * This test is designed to "torture" the code which
126 generates histograms. It is no-crash test. However
127 the code is rich in assertions, so any problems we
128 hope will be caught there.
133 compute pos = rv.normal (56, 3) + rv.uniform (1, 1).
134 compute neg = rv.normal (-86, 2) + rv.uniform (1, 1).
135 compute pn = rv.normal (0, 2) + rv.uniform (1, 2).
136 compute A = rv.uniform (-1, 1).
144 examine pos neg pn by a
148 frequencies pos neg pn
154 dnl The --testing-mode flag is important!!
155 AT_CHECK([pspp --testing-mode -o pspp.txt histogram.sps], [0], [ignore])
160 AT_SETUP([FREQUENCIES charts])
162 DATA LIST LIST /nationality (A10) religion (A20) gender (A8).
168 British Zoroastrian Female
169 British Buddist Female
170 British Buddist Female
171 British Zoroastrian Female
173 German Christian Male
174 German Christian Female
175 German Christian Male
176 German Zoroastrian Female
179 German Pastafarian Female
180 German "Jedi Knight" Female
184 French Christian Male
188 FREQUENCIES /VARIABLES=religion nationality /BARCHART /PIECHART.
192 AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore])
198 AT_SETUP([CROSSTABS charts])
200 DATA LIST LIST /nationality (A10) religion (A20) gender (A8).
206 British Zoroastrian Female
207 British Buddist Female
208 British Buddist Female
209 British Zoroastrian Female
211 German Christian Male
212 German Christian Female
213 German Christian Male
214 German Zoroastrian Female
217 German Pastafarian Female
218 German "Jedi Knight" Female
222 French Christian Male
227 /tables = nationality by religion by gender
228 /tables = nationality by religion
229 /tables = religion by gender
230 /tables = nationality by religion by gender
235 AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore])
242 AT_SETUP([BOXPLOT Empty])
244 DATA LIST LIST /X * Y * .
259 AT_CHECK([pspp -o pspp.txt bp.sps], [0], [ignore])