Fixed: splitCSV and joinCSV had issues with complex CSV data. They now use

Text::CSV_XS internally.
This commit is contained in:
Chris Nehren 2008-07-31 22:02:09 +00:00
parent b0669c1a36
commit 63fe276dac
3 changed files with 23 additions and 44 deletions

View file

@ -23,7 +23,8 @@ my @tests =
['all null', ['', '', ''], ',,'],
['single null', [], ''],
['escape commas', ['w,x', 'y,z'], '"w,x","y,z"'],
['escape double quotes', ['abc"def', 'ghi-jkl', 'mnop'], '"abc""def",ghi-jkl,mnop']);
['escape double quotes', ['abc"def', 'ghi-jkl', 'mnop'], '"abc""def",ghi-jkl,mnop'],
['cruel embedded newlines', ['foo', 'bar', 'baz', "hello\nworld", 'how are you'], qq{foo,bar,baz,"hello\nworld","how are you"}]);
plan(tests => scalar(@tests) * 2);
foreach my $testspec (@tests) {