From 8c101982e029100b74b4c18f8743fa35e4ec63ff Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sat, 20 Apr 2024 07:53:35 +0000 Subject: [PATCH] Integration tests: Add writing out the document This will cover some more functionality git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917174 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/stress/XWPFFileHandler.java | 3 +++ test-data/spreadsheet/stress.xls | Bin 65024 -> 65024 bytes 2 files changed, 3 insertions(+) diff --git a/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java index d588af7df5..9b31a61881 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java @@ -22,6 +22,7 @@ import java.io.FileInputStream; import java.io.InputStream; import java.util.Set; +import org.apache.commons.io.output.NullOutputStream; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.junit.jupiter.api.Test; @@ -41,6 +42,8 @@ public class XWPFFileHandler extends AbstractFileHandler { try (XWPFDocument doc = new XWPFDocument(stream)) { new POIXMLDocumentHandler().handlePOIXMLDocument(doc); POIXMLDocumentHandler.cursorRecursive(doc.getDocument()); + + doc.write(NullOutputStream.INSTANCE); } catch (POIXMLException e) { Exception cause = (Exception)e.getCause(); throw cause == null ? e : cause; diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 0c9f7271897f76f3fa7dc9d65ec477544d0af359..e784502ec932a9382521f6d5b521e6f8dc2cf333 100644 GIT binary patch delta 2519 zcmZ9O3s6*L6vw}Bm&J8ixNMY^aA&BUX@-{Z0lF*PQWQng1Rtpci9BK&8+GHRa)X3VJx z24~KGSnrtTbfk8QKD~r+bKYsc5Ze?XiaGs;-fMc9oami&OJox zD|WUEyYTin$B8)My)$;*AsoW1>*Z>l;$-CwzP~%9O{5AxwYT(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