mirror of https://github.com/apache/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
This commit is contained in:
parent
7c87528bb6
commit
5ec8bc815e
|
@ -19,6 +19,8 @@ package org.apache.poi.xwpf.usermodel;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.poi.util.Units;
|
import org.apache.poi.util.Units;
|
||||||
|
@ -153,4 +155,18 @@ public class TestXWPFBugs {
|
||||||
para.removeRun(para.getRuns().size() -2);
|
para.removeRun(para.getRuns().size() -2);
|
||||||
assertEquals("Some text some hyper links link linkNew Text", para.getText());
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue