From 29c8e5056cec898ab9f62fcd3e5a6d4fed2e2514 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 11 Mar 2015 20:39:18 +0000 Subject: [PATCH] Verify that document from bug 56392 works git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1666003 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/xwpf/usermodel/TestXWPFBugs.java | 13 ++++++++++++- test-data/document/56392.docx | Bin 0 -> 11211 bytes 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test-data/document/56392.docx 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 bded4e48c4..053b611e3c 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java @@ -16,10 +16,14 @@ ==================================================================== */ package org.apache.poi.xwpf.usermodel; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import java.io.FileInputStream; import java.io.IOException; +import org.apache.poi.openxml4j.exceptions.OpenXML4JException; +import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.xwpf.XWPFTestDataSamples; import org.apache.poi.xwpf.usermodel.XWPFRun.FontCharRange; import org.junit.Test; @@ -77,4 +81,11 @@ public class TestXWPFBugs { } } } + + + @Test + public void test56392() throws IOException, OpenXML4JException { + XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("56392.docx"); + assertNotNull(doc); + } } diff --git a/test-data/document/56392.docx b/test-data/document/56392.docx new file mode 100644 index 0000000000000000000000000000000000000000..89a71aed2fdbf90c860a15d680680902acbb9686 GIT binary patch literal 11211 zcmbulWmp{B)-8-XAy^3RPLQC%CAho0L*wr5?(XjH?lkTaf(Cb&V3+Lo-Dl_I`_B1s z@9d}Q>FTO6tJheo)~q?#kP!!mKm&n+fdQ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