Commit Graph

12 Commits

Author SHA1 Message Date
Geoff Leyland
13e3b69c74 csv.lua: this all doesn't work with small buffer sizes. Whoops. Made tests at small buffer sizes and fixed the problem 2014-05-26 17:06:28 +12:00
Geoff Leyland
c40e12bb7c test.lua: add an exclamation mark to the end of newlines so that they're explicit 2014-05-26 16:44:57 +12:00
Geoff Leyland
deac119c13 csv.lua: move some variable definitions closer to their use (the aim here is to move find and sub out into a buffer object) 2014-05-26 16:21:45 +12:00
Geoff Leyland
e0123ee133 csv.lua: fix typos 2014-05-26 16:17:38 +12:00
Kevin Martin
f28dfe0720 Added an openstring function, by wrapping the string in an object
that supports read(bytes) and passing the object to the underlying
code. Modified all the tests to run with both open and openstring.

Changed the default buffer size in csv.lua to match the value in the
README, and added the crucial blank line to test-data/blankline.csv
2014-05-18 18:52:16 +01:00
Geoff Leyland
c9988c8b93 handle blank lines more correctly 2014-01-29 13:28:47 +13:00
Geoff Leyland
ac033b3075 ignore blank lines (I'm not sure this is a good thing *in* the file, but ignoring blank lines at the end is a good idea) 2013-12-06 12:56:02 +13:00
Geoff Leyland
279ca0717d added tests for embedded quotes and reading files with headers 2013-12-05 21:37:25 +13:00
Geoff Leyland
50e14b7484 Added one test, for embedded newlines, and fixed all the bugs it found 2013-12-05 21:20:10 +13:00
Geoff Leyland
7294a1bc72 fix up accidental global variables. Thanks on Ashwyn Hirschi 2013-12-05 15:01:41 +13:00
Geoff Leyland
daa18891f3 get the read size right in extend. Thanks to xxopxe@gmail.com 2013-12-05 14:46:38 +13:00
Geoff Leyland
da57f60673 first commit of lua-csv 2013-12-04 22:16:11 +13:00