[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: svn commit: r1700073 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.
From: ggregory () apache ! org
Date: 2015-08-29 20:51:46
Message-ID: 20150829205147.A7828AC006A () hades ! apache ! org
[Download RAW message or body]
Author: ggregory
Date: Sat Aug 29 20:51:46 2015
New Revision: 1700073
URL: http://svn.apache.org/r1700073
Log:
Test CSV-154.
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java?rev=1700073&r1=1700072&r2=1700073&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java \
(original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java \
Sat Aug 29 20:51:46 2015 @@ -30,10 +30,12 @@ import static org.junit.Assert.assertTru
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Arrays;
+import org.junit.Assert;
import org.junit.Test;
/**
@@ -375,6 +377,20 @@ public class CSVFormatTest {
}
@Test
+ public void testJIraCsv154() throws IOException {
+ final String comment = "This is a header comment";
+ CSVFormat format = CSVFormat.EXCEL.withHeader("H1", \
"H2").withCommentMarker('#') + .withHeaderComments(comment);
+ StringBuilder out = new StringBuilder();
+ final CSVPrinter printer = format.print(out);
+ printer.print("A");
+ printer.print("B");
+ printer.close();
+ String s = out.toString();
+ Assert.assertTrue(s, s.contains(comment));
+ }
+
+ @Test
public void testWithIgnoreEmptyLines() throws Exception {
assertFalse(CSVFormat.DEFAULT.withIgnoreEmptyLines(false).getIgnoreEmptyLines());
assertTrue(CSVFormat.DEFAULT.withIgnoreEmptyLines().getIgnoreEmptyLines());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic