X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fdescriptives.at;h=37b7d5a81392ac48b10e182096b42acd9eea7155;hb=fce028c380d496e42823fd24774e0159ed7cc110;hp=9cc7ca0515606fa4a6e1cacb041b2a892672d649;hpb=fa1fffd5c789d9c7875fc3bdf556eaf017cf524e;p=pspp diff --git a/tests/language/stats/descriptives.at b/tests/language/stats/descriptives.at index 9cc7ca0515..37b7d5a813 100644 --- a/tests/language/stats/descriptives.at +++ b/tests/language/stats/descriptives.at @@ -276,3 +276,48 @@ group,a,b,Za,Zb 2.00,500.00,10000.00,1.10,1.10 ]) AT_CLEANUP + +dnl Ideally DESCRIPTIVES would not make temporary transformations permanent +dnl as it does now (bug #38786), so these results are imperfect. However, +dnl this test does verify that DESCRIPTIVES does not crash in this situation +dnl (as it once did). +AT_SETUP([DESCRIPTIVES -- Z scores bug with TEMPORARY]) +AT_DATA([descriptives.sps], [dnl +DATA LIST LIST NOTABLE /id abc. +BEGIN DATA. +1 3.5 +2 2.0 +3 2.0 +4 3.5 +5 3.0 +6 4.0 +7 5.0 +END DATA. + +TEMPORARY. +SELECT IF id < 7 . + +DESCRIPTIVES /VAR=abc/SAVE. +LIST. +]) +AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl +descriptives.sps:15: warning: DESCRIPTIVES: DESCRIPTIVES with Z scores ignores TEMPORARY. Temporary transformations will be made permanent. + +Table: Mapping of variables to corresponding Z-scores. +Source,Target +abc,Zabc + +Table: Valid cases = 6; cases with missing value(s) = 0. +Variable,N,Mean,Std Dev,Minimum,Maximum +abc,6,3.00,.84,2.00,4.00 + +Table: Data List +id,abc,Zabc +1.00,3.50,.60 +2.00,2.00,-1.20 +3.00,2.00,-1.20 +4.00,3.50,.60 +5.00,3.00,.00 +6.00,4.00,1.20 +]) +AT_CLEANUP