Make sure empty lines are ignored by constructing CSVFormat this way. Remove corresponding assert that would have failed if CSVFormat.newBuilder() was changed to withIgnoreEmptyLines(false)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465718 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
19cb2ca2eb
commit
449e9a8cf6
|
@ -88,12 +88,9 @@ public class CSVLexerTest {
|
|||
"\n"+
|
||||
"\n"+
|
||||
"# Final comment\n"; // 7
|
||||
final CSVFormat format = CSVFormat.newBuilder().withCommentStart('#').build();
|
||||
assertTrue("Should ignore empty lines", format.getIgnoreEmptyLines());
|
||||
|
||||
final CSVFormat format = CSVFormat.newBuilder().withCommentStart('#').withIgnoreEmptyLines(true).build();
|
||||
final Lexer parser = getLexer(code, format);
|
||||
|
||||
|
||||
assertThat(parser.nextToken(new Token()), matches(TOKEN, "1"));
|
||||
assertThat(parser.nextToken(new Token()), matches(TOKEN, "2"));
|
||||
assertThat(parser.nextToken(new Token()), matches(TOKEN, "3"));
|
||||
|
|
Loading…
Reference in New Issue