X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Freliability.at;h=9c5d41378e44427cc800539347e6183a9a184155;hb=73ce37552fb2846a5a5c23d401f21b4951888029;hp=5676b9469039b1d0c8ccbad5cf62140a6a90202e;hpb=a258e53c63a08b0ec48aea8f03808eb651729424;p=pspp diff --git a/tests/language/stats/reliability.at b/tests/language/stats/reliability.at index 5676b94690..9c5d41378e 100644 --- a/tests/language/stats/reliability.at +++ b/tests/language/stats/reliability.at @@ -175,6 +175,7 @@ RELIABILITY /VARIABLES=var2 var6 var8 var15 var17 var19 /SCALE('Totals') var6 var8 var15 var17 /SUMMARY = total + /STATISTICS = DESCRIPTIVES COVARIANCES . @@ -182,7 +183,9 @@ RELIABILITY /VARIABLES=var6 var8 var15 var17 . ]) -AT_CHECK([pspp -o pspp.csv reliability.sps]) +AT_CHECK([pspp -o pspp.csv reliability.sps], [0], + [reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced. +]) AT_CHECK([cat pspp.csv], [0], [dnl Scale: Everything @@ -215,6 +218,8 @@ Spearman-Brown Coefficient,Equal Length,,.75 ,Unequal Length,,.75 Guttman Split-Half Coefficient,,,.75 +reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced. + Scale: Totals Table: Case Processing Summary @@ -247,3 +252,85 @@ Cronbach's Alpha,N of Items .75,4 ]) AT_CLEANUP + + +dnl This was causing a AT. +AT_SETUP([RELIABILITY bad syntax]) +AT_DATA([bad-syntax.sps], [dnl +data list notable list /x * y *. +begin data. +1 10 +2 20 +3 30 +4 50 +5 50 +end data. + +* This syntax is incorrect +reliability x y. +]) + +AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore]) + +AT_CLEANUP + +dnl Checks for a crash when bad syntax followed scale specification. +AT_SETUP([RELIABILITY bad syntax 2]) +AT_DATA([bad-syntax.sps], [dnl +new file. +data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *. +begin data. +end data. + +* This syntax is incorrect +reliability variables=f01 to f10/asdfj. +]) +AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore]) +AT_CLEANUP + + +dnl Checks for a crash when the active file was empty. Bug #38660. +AT_SETUP([RELIABILITY crash with no data]) +AT_DATA([reliability.sps], [dnl +new file. +data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *. +begin data. +end data. + +reliability variables=f01 to f10. +]) +AT_CHECK([pspp -O format=csv reliability.sps], [0], []) +AT_CLEANUP + + + + +dnl This is an example from doc/tutorial.texi +dnl So if the results of this have to be changed in any way, +dnl make sure to update that file. +AT_SETUP([RELIABILITY tutorial example]) +AT_DATA([tut-example.sps], [dnl +get file='hotel.sav'. + +compute v3 = 6 - v3. +compute v5 = 6 - v5. + +reliability variables = v1 v3 v4. +]) + +AT_CHECK([ln -s $top_srcdir/examples/hotel.sav .], [0]) +AT_CHECK([pspp -O format=csv tut-example.sps], [0], [dnl +Scale: ANY + +Table: Case Processing Summary +,,N,% +Cases,Valid,17,100.00 +,Excluded,0,.00 +,Total,17,100.00 + +Table: Reliability Statistics +Cronbach's Alpha,N of Items +.81,3 +]) + +AT_CLEANUP