From 1db2bd57421a548a388193711969f3d94b661cee Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 3 Aug 2022 22:35:20 -0700 Subject: [PATCH] ctables fixes --- src/language/stats/ctables.c | 2 +- tests/language/stats/ctables.at | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index 78ba956aa4..6fcd0c7d35 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -5630,7 +5630,7 @@ ctable_pcexpr_parse_primary (struct lexer *lexer, struct dictionary *dict) } else { - if (lex_force_num (lexer)) + if (!lex_force_num (lexer)) return false; e = ctpo_cat_nrange (-DBL_MAX, lex_number (lexer)); lex_get (lexer); diff --git a/tests/language/stats/ctables.at b/tests/language/stats/ctables.at index 9e2e272e0a..0ab1b7c439 100644 --- a/tests/language/stats/ctables.at +++ b/tests/language/stats/ctables.at @@ -535,23 +535,6 @@ ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category specification as format DATETIME: Day (123) must be between 1 and 31.. 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123']. | ^~~~~ - -ctables.sps:23: error: CTABLES: Summaries may appear only on one axis. - -ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a -summary. - 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT]. - | ^~~~~ - -ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a -summary. - 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT]. - | ^~~~~ - -ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a -summary. - 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT]. - | ^~~~~ ]]) AT_CLEANUP -- 2.30.2