RELIABILITY: Ignore STATISTICS subcommand.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 8 Mar 2015 20:41:01 +0000 (13:41 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 8 Mar 2015 20:41:01 +0000 (13:41 -0700)
Statistics aren't yet implemented but it's more friendly to produce
everything we can than to fail the whole command.

Thanks to Tom Smekens for reporting the problem.

src/language/stats/reliability.c
tests/language/stats/reliability.at

index 8975e4f9082d780bc18704a55ffccfba7ac6ca61..bb3bbb2644548f78cf4edcf3aa61d19ee3bb4899 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011, 2013, 2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -274,6 +274,14 @@ cmd_reliability (struct lexer *lexer, struct dataset *ds)
                }
            }
        }
+      else if (lex_match_id (lexer, "STATISTICS"))
+        {
+          lex_match (lexer, T_EQUALS);
+          msg (SW, _("The STATISTICS subcommand is not yet implemented.  "
+                     "No statistics will be produced."));
+          while (lex_match (lexer, T_ID))
+            continue;
+        }
       else
        {
          lex_error (lexer, NULL);
index 28fadab8df892761e495e21a4b30d5d7c78c8e99..9c5d41378e44427cc800539347e6183a9a184155 100644 (file)
@@ -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