From 451d9429dc5a7c4ceb7ecf3362fc1a4e9c0c971f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 8 Mar 2015 13:41:01 -0700 Subject: [PATCH] RELIABILITY: Ignore STATISTICS subcommand. 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 | 10 +++++++++- tests/language/stats/reliability.at | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/language/stats/reliability.c b/src/language/stats/reliability.c index 8975e4f908..bb3bbb2644 100644 --- a/src/language/stats/reliability.c +++ b/src/language/stats/reliability.c @@ -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); diff --git a/tests/language/stats/reliability.at b/tests/language/stats/reliability.at index 28fadab8df..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 -- 2.30.2