Skip to content

Commit 0c3bf82

Browse files
committed
Add testPrintOnePositiveInteger().
1 parent 47d11b8 commit 0c3bf82

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,15 @@ public void testPrintNullValues() throws IOException {
812812
}
813813
}
814814

815+
@Test
816+
public void testPrintOnePositiveInteger() throws IOException {
817+
final StringWriter sw = new StringWriter();
818+
try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.DEFAULT.withQuoteMode(QuoteMode.MINIMAL))) {
819+
printer.print(Integer.MAX_VALUE);
820+
assertEquals(String.valueOf(Integer.MAX_VALUE), sw.toString());
821+
}
822+
}
823+
815824
@Test
816825
public void testPrintToFileWithCharsetUtf16Be() throws IOException {
817826
File file = File.createTempFile(getClass().getName(), ".csv");

0 commit comments

Comments
 (0)