Add testPrintOnePositiveInteger().

This commit is contained in:
Gary Gregory 2016-07-30 16:36:49 -07:00
parent 47d11b853f
commit 0c3bf8266d
1 changed files with 9 additions and 0 deletions

View File

@ -812,6 +812,15 @@ public class CSVPrinterTest {
}
}
@Test
public void testPrintOnePositiveInteger() throws IOException {
final StringWriter sw = new StringWriter();
try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.DEFAULT.withQuoteMode(QuoteMode.MINIMAL))) {
printer.print(Integer.MAX_VALUE);
assertEquals(String.valueOf(Integer.MAX_VALUE), sw.toString());
}
}
@Test
public void testPrintToFileWithCharsetUtf16Be() throws IOException {
File file = File.createTempFile(getClass().getName(), ".csv");