You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/05/28 18:02:31 UTC
[commons-csv] branch master updated: Fix bug in test.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push:
new a5e21ef Fix bug in test.
a5e21ef is described below
commit a5e21efe8ff06f6ddf69e73dcbde2c335ed8bbe7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 28 14:02:26 2020 -0400
Fix bug in test.
---
src/test/java/org/apache/commons/csv/issues/JiraCsv149Test.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/csv/issues/JiraCsv149Test.java b/src/test/java/org/apache/commons/csv/issues/JiraCsv149Test.java
index 0a59c70..d44093a 100644
--- a/src/test/java/org/apache/commons/csv/issues/JiraCsv149Test.java
+++ b/src/test/java/org/apache/commons/csv/issues/JiraCsv149Test.java
@@ -30,15 +30,17 @@ import org.junit.jupiter.api.Test;
@Disabled
public class JiraCsv149Test {
+ private static final String CR_LF = "\r\n";
+
@Test
public void testJiraCsv149EndWithEOL() throws IOException {
testJiraCsv149EndWithEolAtEof(true);
}
private void testJiraCsv149EndWithEolAtEof(boolean eolAtEof) throws IOException {
- String source = "A,B,C,D\r\n" + "a1,b1,c1,d1\r\n" + "a2,b2,c2,d2";
+ String source = "A,B,C,D" + CR_LF + "a1,b1,c1,d1" + CR_LF + "a2,b2,c2,d2";
if (eolAtEof) {
- source += "\\r\\n";
+ source += CR_LF;
}
final StringReader records = new StringReader(source);
final CSVFormat format = CSVFormat.RFC4180.withFirstRecordAsHeader().withQuote('"');