Merge pull request #184 from mikemorris/master

[#185,be/csv][s]: adding serializeCSV function to CSV backend.
This commit is contained in:
Rufus Pollock
2012-07-14 17:33:45 -07:00
2 changed files with 98 additions and 0 deletions

View File

@@ -64,5 +64,19 @@ test("parseCSVdelimiter", function() {
});
test("serializeCSV", function() {
var csv = [
['Jones, Jay', 10],
['Xyz "ABC" O\'Brien', '11:35' ],
['Other, AN', '12:35' ]
];
var array = recline.Backend.CSV.serializeCSV(csv);
var exp = '"Jones, Jay",10\n' +
'"Xyz ""ABC"" O\'Brien",11:35\n' +
'"Other, AN",12:35\n';
deepEqual(array, exp);
});
})(this.jQuery);