You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/03/29 02:43:34 UTC
svn commit: r1306660 -
/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
Author: sebb
Date: Thu Mar 29 00:43:34 2012
New Revision: 1306660
URL: http://svn.apache.org/viewvc?rev=1306660&view=rev
Log:
Add back trailing comment test (this time with correct expected results)
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1306660&r1=1306659&r2=1306660&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Thu Mar 29 00:43:34 2012
@@ -330,14 +330,14 @@ public class CSVParserTest {
@Test
public void testDefaultFormat() throws IOException {
String code = ""
- + "a,b\n" // 1)
- + "\"\n\",\" \"\n" // 2)
+ + "a,b#\n" // 1)
+ + "\"\n\",\" \",#\n" // 2)
+ "#,\"\"\n" // 3)
+ "# Final comment\n"// 4)
;
String[][] res = {
- {"a", "b"},
- {"\n", " "},
+ {"a", "b#"},
+ {"\n", " ", "#"},
{"#", ""},
{"# Final comment"}
};
@@ -352,8 +352,8 @@ public class CSVParserTest {
assertTrue("Failed to parse without comments", CSVPrinterTest.equals(res, records));
String[][] res_comments = {
- {"a", "b"},
- {"\n", " "},
+ {"a", "b#"},
+ {"\n", " ", "#"},
};
format = CSVFormat.DEFAULT.withCommentStart('#');