Skip to content

Commit 02a36dd

Browse files
committed
Test multiple adjacent comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306650 13f79535-47bb-0310-9956-ffa450edef68
1 parent 70f00f9 commit 02a36dd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/test/java/org/apache/commons/csv/CSVParserTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,13 @@ public void testDefaultFormat() throws IOException {
333333
+ "a,b\n" // 1)
334334
+ "\"\n\",\" \"\n" // 2)
335335
+ "#,\"\"\n" // 3)
336+
+ "# Final comment\n"// 4)
336337
;
337338
String[][] res = {
338339
{"a", "b"},
339340
{"\n", " "},
340341
{"#", ""},
342+
{"# Final comment"}
341343
};
342344

343345
CSVFormat format = CSVFormat.DEFAULT;
@@ -347,7 +349,7 @@ public void testDefaultFormat() throws IOException {
347349
List<CSVRecord> records = parser.getRecords();
348350
assertTrue(records.size() > 0);
349351

350-
assertTrue(CSVPrinterTest.equals(res, records));
352+
assertTrue("Failed to parse without comments", CSVPrinterTest.equals(res, records));
351353

352354
String[][] res_comments = {
353355
{"a", "b"},
@@ -358,7 +360,7 @@ public void testDefaultFormat() throws IOException {
358360
parser = new CSVParser(code, format);
359361
records = parser.getRecords();
360362

361-
assertTrue(CSVPrinterTest.equals(res_comments, records));
363+
assertTrue("Failed to parse with comments",CSVPrinterTest.equals(res_comments, records));
362364
}
363365

364366
@Test

0 commit comments

Comments
 (0)