|
17 | 17 |
|
18 | 18 | package org.apache.commons.csv; |
19 | 19 |
|
20 | | -import static org.apache.commons.csv.Constants.CR; |
21 | | -import static org.apache.commons.csv.Constants.CRLF; |
22 | | -import static org.apache.commons.csv.Constants.LF; |
23 | | -import static org.junit.Assert.assertArrayEquals; |
24 | | -import static org.junit.Assert.assertEquals; |
25 | | -import static org.junit.Assert.assertFalse; |
26 | | -import static org.junit.Assert.assertNotNull; |
27 | | -import static org.junit.Assert.assertNull; |
28 | | -import static org.junit.Assert.assertTrue; |
29 | | -import static org.junit.Assert.fail; |
| 20 | +import org.apache.commons.io.input.BOMInputStream; |
| 21 | +import org.junit.Assert; |
| 22 | +import org.junit.Ignore; |
| 23 | +import org.junit.Test; |
30 | 24 |
|
31 | 25 | import java.io.File; |
32 | 26 | import java.io.IOException; |
|
45 | 39 | import java.util.Map; |
46 | 40 | import java.util.NoSuchElementException; |
47 | 41 |
|
48 | | -import org.apache.commons.io.input.BOMInputStream; |
49 | | -import org.junit.Assert; |
50 | | -import org.junit.Ignore; |
51 | | -import org.junit.Test; |
| 42 | +import static org.apache.commons.csv.Constants.*; |
| 43 | +import static org.junit.Assert.*; |
52 | 44 |
|
53 | 45 | /** |
54 | 46 | * CSVParserTest |
@@ -497,6 +489,11 @@ public void testDuplicateHeaderEntries() throws Exception { |
497 | 489 | CSVParser.parse("a,b,a\n1,2,3\nx,y,z", CSVFormat.DEFAULT.withHeader(new String[]{})); |
498 | 490 | } |
499 | 491 |
|
| 492 | + @Test() |
| 493 | + public void testDuplicateHeaderEntriesWithEmptyHeaders() throws Exception { |
| 494 | + CSVParser.parse("a,,c,d,,\n1,2,3,4,5,6\nx,y,z,v,u,w", CSVFormat.DEFAULT.withHeader(new String[]{})); |
| 495 | + } |
| 496 | + |
500 | 497 | @Test |
501 | 498 | public void testGetLine() throws IOException { |
502 | 499 | final CSVParser parser = CSVParser.parse(CSV_INPUT, CSVFormat.DEFAULT.withIgnoreSurroundingSpaces(true)); |
|
0 commit comments