Skip to content

Commit

Permalink
Failing tsv test
Browse files Browse the repository at this point in the history
  • Loading branch information
emilbayes committed Jun 7, 2016
1 parent 2e36a5d commit 207a504
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/data/newlines.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
a b c
1 2 3
"Once upon
a time" 5 6
7 8 9
12 changes: 12 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ test('newlines in a cell', function (t) {
}
})

test('newlines in a cell', function (t) {
collect('newlines.csv', {separator: '\t'}, verify)
function verify (err, lines) {
t.false(err, 'no err')
t.same(lines[0], {a: '1', b: '2', c: '3'}, 'first row')
t.same(lines[1], {a: 'Once upon ' + eol + 'a time', b: '5', c: '6'}, 'second row')
t.same(lines[2], {a: '7', b: '8', c: '9'}, 'fourth row')
t.equal(lines.length, 3, '3 rows')
t.end()
}
})

test('raw escaped quotes', function (t) {
collect('escaped_quotes.csv', verify)
function verify (err, lines) {
Expand Down

0 comments on commit 207a504

Please sign in to comment.