X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Foutput%2Fcharts.at;h=59ad8ca319a9584780ea0e36572d0538ad274865;hb=0197b892a0c3124d0a66c6f5497c7be5e58955ad;hp=dbc733f97398c0f4147b8505ca0ec07cdd53272f;hpb=1e0c41f19dd34df5d34728c40e736d8ba43c5021;p=pspp diff --git a/tests/output/charts.at b/tests/output/charts.at index dbc733f973..59ad8ca319 100644 --- a/tests/output/charts.at +++ b/tests/output/charts.at @@ -19,7 +19,7 @@ end file. end input program. examine x y by a - /plot = histogram, npplot + /plot = histogram, npplot spreadlevel(1) . examine x y by a @@ -33,7 +33,7 @@ examine x y by a . ]) -AT_CHECK([pspp -O format=csv charts.sps], [0], [ignore]) +AT_CHECK([pspp -o pspp.txt charts.sps], [0], [ignore]) AT_CLEANUP @@ -85,7 +85,7 @@ ROC /fred bert charlie by group (0) ]) -AT_CHECK([pspp -O format=csv roc.sps], [0], [ignore]) +AT_CHECK([pspp -o pspp.txt roc.sps], [0], [ignore]) AT_CLEANUP @@ -115,6 +115,157 @@ factor /variables = all ]) -AT_CHECK([pspp -O format=csv scree.sps], [0], [ignore]) +AT_CHECK([pspp -o pspp.txt scree.sps], [0], [ignore]) AT_CLEANUP + + +AT_SETUP([Histogram]) +AT_DATA([histogram.sps],[ +* This test is designed to "torture" the code which + generates histograms. It is no-crash test. However + the code is rich in assertions, so any problems we + hope will be caught there. + + +input program. +loop #i = 1 to 1000. + compute pos = rv.normal (56, 3) + rv.uniform (1, 1). + compute neg = rv.normal (-86, 2) + rv.uniform (1, 1). + compute pn = rv.normal (0, 2) + rv.uniform (1, 2). + compute A = rv.uniform (-1, 1). + compute A = (A > 0). + end case. +end loop. +end file. +end input program. + + +examine pos neg pn by a + /plot = histogram + . + +frequencies pos neg pn + /format=notable + /histogram=normal. +]) + + +dnl The --testing-mode flag is important!! +AT_CHECK([pspp --testing-mode -o pspp.txt histogram.sps], [0], [ignore]) + +AT_CLEANUP + + +AT_SETUP([FREQUENCIES charts]) +AT_DATA([xxx.sps],[ +DATA LIST LIST /nationality (A10) religion (A20) gender (A8). +BEGIN DATA. +Australian Sikh Male +Australian Sikh Male +Australian Sikh Male +Australian Sikh Male +British Zoroastrian Female +British Buddist Female +British Buddist Female +British Zoroastrian Female +German Muslim Male +German Christian Male +German Christian Female +German Christian Male +German Zoroastrian Female +German Sikh Female +German Muslim Female +German Pastafarian Female +German "Jedi Knight" Female +Belgian Sikh Male +French Muslim Male +French Muslim Male +French Christian Male +END DATA. + + +FREQUENCIES /VARIABLES=religion nationality /BARCHART /PIECHART. +]) + + +AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore]) + +AT_CLEANUP + + + +AT_SETUP([CROSSTABS charts]) +AT_DATA([xxx.sps],[ +DATA LIST LIST /nationality (A10) religion (A20) gender (A8). +BEGIN DATA. +Australian Sikh Male +Australian Sikh Male +Australian Sikh Male +Australian Sikh Male +British Zoroastrian Female +British Buddist Female +British Buddist Female +British Zoroastrian Female +German Muslim Male +German Christian Male +German Christian Female +German Christian Male +German Zoroastrian Female +German Sikh Female +German Muslim Female +German Pastafarian Female +German "Jedi Knight" Female +Belgian Sikh Male +French Muslim Male +French Muslim Male +French Christian Male +END DATA. + + +CROSSTABS + /tables = nationality by religion by gender + /tables = nationality by religion + /tables = religion by gender + /tables = nationality by religion by gender + /barchart. +]) + + +AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore]) + +AT_CLEANUP + + + + +AT_SETUP([BOXPLOT Empty]) +AT_DATA([bp.sps],[ +DATA LIST LIST /X * Y * . +BEGIN DATA +1 +2 +2 +2 +3 +END DATA + +EXAMINE + /VARIABLES = Y + /PLOT = BOXPLOT. +]) + + +AT_CHECK([pspp -o pspp.txt bp.sps], [0], [ignore]) + +AT_CLEANUP + + + + + + + + + +