diff --git a/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java index 7fac6647a..b9fe93a66 100644 --- a/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java +++ b/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java @@ -19,10 +19,12 @@ package org.apache.poi.stress; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import org.apache.poi.hdgf.HDGFDiagram; +import org.apache.poi.hdgf.extractor.VisioTextExtractor; import org.apache.poi.hdgf.streams.Stream; import org.apache.poi.hdgf.streams.TrailerStream; import org.apache.poi.poifs.filesystem.POIFSFileSystem; @@ -48,11 +50,27 @@ public class HDGFFileHandler extends POIFSFileHandler { // a test-case to test this locally without executing the full TestAllFiles @Test public void test() throws Exception { - InputStream stream = new FileInputStream("test-data/diagram/44501.vsd"); + File file = new File("test-data/diagram/44501.vsd"); + + InputStream stream = new FileInputStream(file); try { handleFile(stream); } finally { stream.close(); } + + handleExtracting(file); + + stream = new FileInputStream(file); + try { + VisioTextExtractor extractor = new VisioTextExtractor(stream); + try { + assertNotNull(extractor.getText()); + } finally { + extractor.close(); + } + } finally { + stream.close(); + } } } diff --git a/test-data/diagram/44501a.vsd b/test-data/diagram/44501a.vsd new file mode 100755 index 000000000..7d9a3cefc Binary files /dev/null and b/test-data/diagram/44501a.vsd differ diff --git a/test-data/diagram/44501b.vsd b/test-data/diagram/44501b.vsd new file mode 100755 index 000000000..c8bd7a190 Binary files /dev/null and b/test-data/diagram/44501b.vsd differ diff --git a/test-data/diagram/44501c.vsd b/test-data/diagram/44501c.vsd new file mode 100644 index 000000000..51de23a32 Binary files /dev/null and b/test-data/diagram/44501c.vsd differ diff --git a/test-data/diagram/44501d.vsd b/test-data/diagram/44501d.vsd new file mode 100755 index 000000000..2c1632eba Binary files /dev/null and b/test-data/diagram/44501d.vsd differ diff --git a/test-data/diagram/44501e.vsd b/test-data/diagram/44501e.vsd new file mode 100644 index 000000000..3ca555230 Binary files /dev/null and b/test-data/diagram/44501e.vsd differ