From 9015cdffd3a766c7bc303710383b9371a0528748 Mon Sep 17 00:00:00 2001 From: Garrett Luu Date: Thu, 18 Jun 2020 15:01:51 -0700 Subject: [PATCH] Added test for CRLF newlines --- test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test.js b/test.js index 63c70f5..f417fac 100644 --- a/test.js +++ b/test.js @@ -1958,6 +1958,10 @@ describe('CSV', function() { assert.equal(get_cell(sheet, "C1").t, 's'); assert.equal(get_cell(sheet, "C1").v, '100'); }); + it('should interpret CRLF newlines', function() { + var wb = X.read(new Buffer("sep=&\r\n1&2&3\r\n4&5&6"), {type: "buffer"}); + assert.equal(wb.Sheets.Sheet1["!ref"], "A1:C2"); + }); if(!browser || typeof cptable !== 'undefined') it('should honor codepage for binary strings', function() { var data = "abc,def\nghi,j\xD3l"; [[1251, 'У'],[1252, 'Ó'], [1253, 'Σ'], [1254, 'Ó'], [1255, '׃'], [1256, 'س'], [10000, '”']].forEach(function(m) {