From: John Darrington Date: Sun, 28 Apr 2013 07:15:28 +0000 (+0200) Subject: Fix recently introduces bug in LIST /CASES X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da8cff78bd983d2fc666e8693ea9419b917f123f;p=pspp Fix recently introduces bug in LIST /CASES Commit 4e5a6cc044c6c82e6c4d842bf056579b6bc47d48 contained a bug. This change corrects the bug, and updates a test, such that the bug will be caught, should it ever reappear. --- diff --git a/src/language/data-io/list.c b/src/language/data-io/list.c index c7f85f3917..90564e7a13 100644 --- a/src/language/data-io/list.c +++ b/src/language/data-io/list.c @@ -193,7 +193,7 @@ cmd_list (struct lexer *lexer, struct dataset *ds) if (lex_force_int (lexer)) { - lex_match_int (lexer, &cmd.first); + cmd.first = lex_integer (lexer); lex_get (lexer); } diff --git a/tests/language/data-io/list.at b/tests/language/data-io/list.at index 4beeceed1f..c3a9dbe7bd 100644 --- a/tests/language/data-io/list.at +++ b/tests/language/data-io/list.at @@ -184,17 +184,15 @@ AT_DATA([data.txt], [dnl ]) AT_DATA([list.sps], [dnl DATA LIST FILE='data.txt' NOTABLE/x0 to x9 1-10. -LIST /CASES=FROM 1 TO 25 BY 5. +LIST /CASES=FROM 6 TO 20 BY 5. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 -7,6,7,5,3,2,4,6,6,3 2,3,9,9,6,1,9,6,7,0 2,2,8,4,5,3,4,0,8,3 6,8,2,1,5,6,7,7,4,6 -7,9,7,0,6,2,0,0,9,1 ]) AT_CLEANUP