File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/test/java/org/apache/commons/csv Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -930,6 +930,15 @@ public void testWithEscape() {
930930 assertEquals (Character .valueOf ('&' ), formatWithEscape .getEscapeCharacter ());
931931 }
932932
933+ @ Test
934+ public void testWithEmptyDuplicates () {
935+ final CSVFormat formatWithEmptyDuplicates =
936+ CSVFormat .DEFAULT .withDuplicateHeaderMode (DuplicateHeaderMode .ALLOW_EMPTY );
937+
938+ assertEquals (DuplicateHeaderMode .ALLOW_EMPTY , formatWithEmptyDuplicates .getDuplicateHeaderMode ());
939+ assertFalse (formatWithEmptyDuplicates .getAllowDuplicateHeaderNames ());
940+ }
941+
933942 @ Test
934943 public void testWithEscapeCRThrowsExceptions () {
935944 assertThrows (IllegalArgumentException .class , () -> CSVFormat .DEFAULT .withEscape (CR ));
You can’t perform that action at this time.
0 commit comments