X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fexamine.at;h=95889c50b4d97897cb832bab7ec42e321fc7eb53;hb=c46a4f6eb220d9595be1ad6cb5acb748e45f0a0d;hp=29dab48ff2690f6095b0b9280fc14772d43c2a20;hpb=983dc88647eb2826dd866c8109cf3968ce1e79a9;p=pspp diff --git a/tests/language/stats/examine.at b/tests/language/stats/examine.at index 29dab48ff2..95889c50b4 100644 --- a/tests/language/stats/examine.at +++ b/tests/language/stats/examine.at @@ -615,7 +615,12 @@ BEGIN DATA. . END DATA. -EXAMINE /x PLOT=HISTOGRAM. +EXAMINE /x + PLOT=HISTOGRAM BOXPLOT NPPLOT SPREADLEVEL(1) ALL + /ID=x + /STATISTICS = DESCRIPTIVES EXTREME (5) ALL + /PERCENTILE=AEMPIRICAL + . ]) AT_CHECK([pspp -o pspp.csv examine.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. @@ -1041,3 +1046,72 @@ EXAMINE AT_CHECK([pspp -o pspp.csv examine-empty-parens.sps], [1], [ignore]) AT_CLEANUP + + + + +dnl Test for another crash which happened on bad input syntax +AT_SETUP([EXAMINE -- Bad variable]) + +AT_DATA([examine-bad-variable.sps], [dnl +data list list /h * g *. +begin data. +3 1 +4 1 +5 2 +end data. + +EXAMINE + /VARIABLES/ h + BY g + . +]) + +AT_CHECK([pspp -o pspp.csv examine-bad-variable.sps], [1], [ignore]) + +AT_CLEANUP + + + +dnl Test for yet another crash. This time for extremes vs. missing weight values. +AT_SETUP([EXAMINE -- Extremes vs. Missing Weights]) + +AT_DATA([examine-missing-weights.sps], [dnl +data list notable list /h * g *. +begin data. +3 1 +4 . +5 1 +2 1 +end data. + +WEIGHT BY g. + +EXAMINE h + /STATISTICS extreme(3) + . +]) + +AT_CHECK([pspp -O format=csv examine-missing-weights.sps], [0], [dnl +"examine-missing-weights.sps:13: warning: EXAMINE: At least one case in the data file had a weight value that was user-missing, system-missing, zero, or negative. These case(s) were ignored." + +Table: Case Processing Summary +,Cases,,,,, +,Valid,,Missing,,Total, +,N,Percent,N,Percent,N,Percent +h,3.00,100%,.00,0%,3.00,100% + +Table: Extreme Values +,,,Case Number,Value +h,Highest,1,3,5.00 +,,2,2,4.00 +,,3,1,3.00 +,Lowest,1,4,2.00 +,,2,1,3.00 +,,3,2,4.00 +]) + +AT_CLEANUP + + +