Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
tests: skip_empty_lines dont interpret quoted empty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Feb 9, 2021
1 parent d2fc450 commit 7f368e9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/option.skip_empty_lines.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe 'Option `skip_empty_lines`', ->
] unless err
next err

describe 'true', ->
describe 'usage', ->

it 'skip', (next) ->
parse '''
Expand All @@ -40,6 +40,17 @@ describe 'Option `skip_empty_lines`', ->
[ 'DEF' ]
] unless err
next err

it 'quoted fields are not interpreted as empty', (next) ->
parse '''
ABC\n""\nDEF
''', skip_empty_lines: true, (err, data) ->
data.should.eql [
[ 'ABC' ]
[ '' ]
[ 'DEF' ]
] unless err
next err

it 'skip respect parser.read', (next) ->
data = []
Expand All @@ -63,6 +74,8 @@ describe 'Option `skip_empty_lines`', ->
]
next()
parser.end()

describe 'with other options', ->

it 'used conjointly with trim to ignore whitespaces', (next) ->
parse '''
Expand Down

0 comments on commit 7f368e9

Please sign in to comment.