Fix recently introduces bug in LIST /CASES
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 28 Apr 2013 07:15:28 +0000 (09:15 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 28 Apr 2013 07:15:28 +0000 (09:15 +0200)
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.

src/language/data-io/list.c
tests/language/data-io/list.at

index c7f85f3917d780f564a1060ce1f8d639aee77b37..90564e7a137c3d774ea3e1945674b08e05bb2bcd 100644 (file)
@@ -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);
             }
 
index 4beeceed1f78779ef473c85202b5f62e44f7f32d..c3a9dbe7bd4df1de77aa72cd8bff3f6324d1d926 100644 (file)
@@ -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