From: Dominik Stadler Date: Thu, 2 Jun 2016 20:09:25 +0000 (+0000) Subject: Bug 59378: Try to reproduce, but could not X-Git-Tag: REL_3_15_BETA2~210 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5ec8bc815e534805a0d8c5ab6ff1d62944436509;p=poi.git Bug 59378: Try to reproduce, but could not git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1746623 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java index 0e7b2c55b2..28980da911 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java @@ -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(); + } } diff --git a/test-data/document/59378.docx b/test-data/document/59378.docx new file mode 100644 index 0000000000..f3939ade56 Binary files /dev/null and b/test-data/document/59378.docx differ