data-parser: A hard delimiter at end of line is not an empty field. 20130903030505/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 2 Sep 2013 20:00:30 +0000 (13:00 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 2 Sep 2013 20:00:30 +0000 (13:00 -0700)
commit254183e467ae32e6581fafc798a057f55e34773e
treef29709897a29c4f9c7ed90de6a34233663811de5
parentd7ab350db46e9e410119723b14a6f2783279bd2a
data-parser: A hard delimiter at end of line is not an empty field.

Until now, DATA LIST FREE(',') treated input like this:

    1,2,
    3,4,

as describing six fields, two of which were blank at the end of a line.
A bug report and subsequent experiments showed that in fact this is only
four fields, none of which is blank.  This commit fixes the problem and
adds a new test that should avoid regression against this issue.

Reported by Samuel Afflerbach.
src/language/data-io/data-parser.c
tests/language/data-io/data-list.at
tests/language/data-io/get-data-txt.at