X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fgraph.at;h=f9daa69cbb2f89d53415021ca2777e7f6d506354;hb=43ec93cfe90172f186b71bfc229b34a981f5b128;hp=ae716a3b8d669a9b55f14b3eca7af5d8ad631469;hpb=ab0f16ff4bf644918474042c4f6b0ae7b71aeb78;p=pspp diff --git a/tests/language/stats/graph.at b/tests/language/stats/graph.at index ae716a3b8d..f9daa69cbb 100644 --- a/tests/language/stats/graph.at +++ b/tests/language/stats/graph.at @@ -163,3 +163,170 @@ graph AT_CHECK([pspp -o pspp.pdf null-hist.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP + + +AT_SETUP([GRAPH histogram all missing]) +AT_DATA([null-hist.sps], [dnl +data list list /x *. +begin data. +. +end data. + +graph + /histogram = x. + +]) + +AT_CHECK([pspp null-hist.sps], [0], [ignore]) +dnl Ignore output -- this is just a no-crash check. +AT_CLEANUP + + + + +AT_SETUP([GRAPH barcharts]) +AT_CHECK([ln -s $top_srcdir/examples/physiology.sav .], [0]) +AT_CHECK([ln -s $top_srcdir/examples/repairs.sav .], [0]) + +AT_DATA([barchart.sps], [dnl +GET FILE="physiology.sav". + +GRAPH /BAR = COUNT BY SEX. + +GRAPH /BAR = MEAN(height) BY SEX. + +NEW FILE. + +GET FILE="repairs.sav". + +GRAPH /BAR = MEAN (mtbf) BY factory. + +COMPUTE R = TRUNC(RV.UNIFORM(1,5)). + +GRAPH /BAR = MEAN (mtbf) BY factory BY R. +]) + +AT_CHECK([pspp -o pspp.pdf barchart.sps], [0], [ignore]) +dnl Ignore output -- this is just a no-crash check. + +AT_CLEANUP + + + +AT_SETUP([GRAPH barchart arity]) + +AT_DATA([barchart.sps], [dnl +data list notable list /x y z*. +begin data +1 1 3 +2 1 4 +3 1 3 +4 1 4 +5 . 3 +6 2 4 +7 2 3 +8 2 4 +9 2 3 +10 2 4 +end data. + +* This line is invalid +GRAPH /BAR = COUNT(x) BY y. +]) + +AT_CHECK([pspp -o pspp.pdf barchart.sps], [1], [ignore]) +dnl Ignore output -- this is just a no-crash check. + +AT_CLEANUP + + + + +AT_SETUP([GRAPH barchart bad syntax]) + +AT_DATA([barchart.sps], [dnl +data list notable list /x y z*. +begin data +1 1 3 +2 1 4 +3 1 3 +4 1 4 +5 . 3 +6 2 4 +7 2 3 +8 2 4 +9 2 3 +10 2 4 +end data. + +* This line is invalid +GRAPH /BAR = SCROD BY y. +]) + +AT_CHECK([pspp -o pspp.pdf barchart.sps], [1], [ignore]) +dnl Ignore output -- this is just a no-crash check. + +AT_CLEANUP + + + +AT_SETUP([GRAPH barchart full]) + +AT_DATA([barchart.sps], [dnl +data list notable list /x y z*. +begin data +1 1 3 +2 1 4 +3 1 3 +4 1 4 +5 . 3 +6 2 4 +7 2 3 +8 2 4 +9 2 3 +10 2 4 +end data. + +* This line is invalid +GRAPH /BAR = COUNT by z. +GRAPH /BAR = CUFREQ by z. +GRAPH /BAR = PCT by z. +GRAPH /BAR = CUPCT by z. + +GRAPH /BAR = MEAN(y) BY z. +GRAPH /BAR = SUM(y) BY z. +GRAPH /BAR = MAXIMUM(y) BY z. +GRAPH /BAR = MINIMUM(y) BY z. + +GRAPH /BAR = MEAN(y) BY z BY y. +GRAPH /BAR = SUM(y) BY z BY y. +GRAPH /BAR = MAXIMUM(y) BY z BY y. +GRAPH /BAR = MINIMUM(y) BY z BY y. +]) + +AT_CHECK([pspp -o pspp.pdf barchart.sps], [0], [ignore]) +dnl Ignore output -- this is just a no-crash check. + +AT_CLEANUP + + + + + +AT_SETUP([GRAPH buggy syntax]) + +AT_DATA([barchart.sps], [dnl +data list notable list /x y z*. +begin data +1 1 3 +2 1 4 +10 2 4 +end data. + +GRAPH /BAR = MINIMUM({) BY z BY y. +]) + +AT_CHECK([pspp -o pspp.pdf barchart.sps], [1], [ignore]) +dnl Ignore output -- this is just a no-crash check. + +AT_CLEANUP \ No newline at end of file