You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/07/30 23:36:52 UTC

commons-csv git commit: Add testPrintOnePositiveInteger().

Repository: commons-csv
Updated Branches:
  refs/heads/master 47d11b853 -> 0c3bf8266


Add testPrintOnePositiveInteger().

Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/0c3bf826
Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/0c3bf826
Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/0c3bf826

Branch: refs/heads/master
Commit: 0c3bf8266db0826f4830cb560273f8abbaa58b0a
Parents: 47d11b8
Author: Gary Gregory <gg...@apache.org>
Authored: Sat Jul 30 16:36:49 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Sat Jul 30 16:36:49 2016 -0700

----------------------------------------------------------------------
 src/test/java/org/apache/commons/csv/CSVPrinterTest.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0c3bf826/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
index 873f087..5fde483 100644
--- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
+++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
@@ -813,6 +813,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");
         try (final CSVPrinter printer = CSVFormat.DEFAULT.print(file, StandardCharsets.UTF_16BE)) {