Author: britter
Date: Mon Apr 8 18:37:22 2013
New Revision: 1465718
URL: http://svn.apache.org/r1465718
Log:
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)
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java?rev=1465718&r1=1465717&r2=1465718&view=diff
==============================================================================
---
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
(original)
+++
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexerTest.java
Mon Apr 8 18:37:22 2013
@@ -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"));