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 format=csv 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 format=csv 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 format=csv 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 format=csv 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 format=csv xxx.sps], [0], [ignore])