aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java20
-rwxr-xr-xtest-data/diagram/44501a.vsdbin0 -> 74752 bytes
-rwxr-xr-xtest-data/diagram/44501b.vsdbin0 -> 87040 bytes
-rw-r--r--test-data/diagram/44501c.vsdbin0 -> 22016 bytes
-rwxr-xr-xtest-data/diagram/44501d.vsdbin0 -> 87040 bytes
-rw-r--r--test-data/diagram/44501e.vsdbin0 -> 209920 bytes
6 files changed, 19 insertions, 1 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
index 7fac6647a3..b9fe93a668 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 0000000000..7d9a3cefc6
--- /dev/null
+++ b/test-data/diagram/44501a.vsd
Binary files differ
diff --git a/test-data/diagram/44501b.vsd b/test-data/diagram/44501b.vsd
new file mode 100755
index 0000000000..c8bd7a190d
--- /dev/null
+++ b/test-data/diagram/44501b.vsd
Binary files differ
diff --git a/test-data/diagram/44501c.vsd b/test-data/diagram/44501c.vsd
new file mode 100644
index 0000000000..51de23a325
--- /dev/null
+++ b/test-data/diagram/44501c.vsd
Binary files differ
diff --git a/test-data/diagram/44501d.vsd b/test-data/diagram/44501d.vsd
new file mode 100755
index 0000000000..2c1632ebae
--- /dev/null
+++ b/test-data/diagram/44501d.vsd
Binary files differ
diff --git a/test-data/diagram/44501e.vsd b/test-data/diagram/44501e.vsd
new file mode 100644
index 0000000000..3ca5552304
--- /dev/null
+++ b/test-data/diagram/44501e.vsd
Binary files differ