You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2016/06/02 20:09:25 UTC

svn commit: r1746623 - in /poi/trunk: src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java test-data/document/59378.docx

Author: centic
Date: Thu Jun  2 20:09:25 2016
New Revision: 1746623

URL: http://svn.apache.org/viewvc?rev=1746623&view=rev
Log:
Bug 59378: Try to reproduce, but could not

Added:
    poi/trunk/test-data/document/59378.docx
Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java?rev=1746623&r1=1746622&r2=1746623&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java Thu Jun  2 20:09:25 2016
@@ -19,6 +19,8 @@ package org.apache.poi.xwpf.usermodel;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
 import org.apache.poi.util.Units;
@@ -153,4 +155,18 @@ public class TestXWPFBugs {
       para.removeRun(para.getRuns().size() -2);
       assertEquals("Some text  some hyper links link linkNew Text", para.getText());
   }
+
+    @Test
+    public void test59378() throws Exception {
+        XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("59378.docx");
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        doc.write(out);
+        out.close();
+
+        XWPFDocument doc2 = new XWPFDocument(new ByteArrayInputStream(out.toByteArray()));
+        doc2.close();
+
+        XWPFDocument docBack = XWPFTestDataSamples.writeOutAndReadBack(doc);
+        docBack.close();
+    }
 }

Added: poi/trunk/test-data/document/59378.docx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/document/59378.docx?rev=1746623&view=auto
==============================================================================
Binary files poi/trunk/test-data/document/59378.docx (added) and poi/trunk/test-data/document/59378.docx Thu Jun  2 20:09:25 2016 differ



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org