From 449e9a8cf64738dde865d775f982e797e74d52fa Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Mon, 8 Apr 2013 18:37:22 +0000 Subject: [PATCH] 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 --- src/test/java/org/apache/commons/csv/CSVLexerTest.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/csv/CSVLexerTest.java b/src/test/java/org/apache/commons/csv/CSVLexerTest.java index 0e01952a..6c53c587 100644 --- a/src/test/java/org/apache/commons/csv/CSVLexerTest.java +++ b/src/test/java/org/apache/commons/csv/CSVLexerTest.java @@ -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"));