You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2015/03/22 14:42:07 UTC
svn commit: r1668369 - in /poi/trunk:
src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
test-data/diagram/44501a.vsd test-data/diagram/44501b.vsd
test-data/diagram/44501c.vsd test-data/diagram/44501d.vsd
test-data/diagram/44501e.vsd
Author: centic
Date: Sun Mar 22 13:42:06 2015
New Revision: 1668369
URL: http://svn.apache.org/r1668369
Log:
Add more test-files from bug 44501, all seem to work fine now
Added:
poi/trunk/test-data/diagram/44501a.vsd (with props)
poi/trunk/test-data/diagram/44501b.vsd (with props)
poi/trunk/test-data/diagram/44501c.vsd
poi/trunk/test-data/diagram/44501d.vsd (with props)
poi/trunk/test-data/diagram/44501e.vsd
Modified:
poi/trunk/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
Modified: poi/trunk/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java?rev=1668369&r1=1668368&r2=1668369&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java (original)
+++ poi/trunk/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java Sun Mar 22 13:42:06 2015
@@ -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 POI
// 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();
+ }
}
}
Added: poi/trunk/test-data/diagram/44501a.vsd
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/diagram/44501a.vsd?rev=1668369&view=auto
==============================================================================
Binary files poi/trunk/test-data/diagram/44501a.vsd (added) and poi/trunk/test-data/diagram/44501a.vsd Sun Mar 22 13:42:06 2015 differ
Propchange: poi/trunk/test-data/diagram/44501a.vsd
------------------------------------------------------------------------------
svn:executable = *
Added: poi/trunk/test-data/diagram/44501b.vsd
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/diagram/44501b.vsd?rev=1668369&view=auto
==============================================================================
Binary files poi/trunk/test-data/diagram/44501b.vsd (added) and poi/trunk/test-data/diagram/44501b.vsd Sun Mar 22 13:42:06 2015 differ
Propchange: poi/trunk/test-data/diagram/44501b.vsd
------------------------------------------------------------------------------
svn:executable = *
Added: poi/trunk/test-data/diagram/44501c.vsd
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/diagram/44501c.vsd?rev=1668369&view=auto
==============================================================================
Binary files poi/trunk/test-data/diagram/44501c.vsd (added) and poi/trunk/test-data/diagram/44501c.vsd Sun Mar 22 13:42:06 2015 differ
Added: poi/trunk/test-data/diagram/44501d.vsd
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/diagram/44501d.vsd?rev=1668369&view=auto
==============================================================================
Binary files poi/trunk/test-data/diagram/44501d.vsd (added) and poi/trunk/test-data/diagram/44501d.vsd Sun Mar 22 13:42:06 2015 differ
Propchange: poi/trunk/test-data/diagram/44501d.vsd
------------------------------------------------------------------------------
svn:executable = *
Added: poi/trunk/test-data/diagram/44501e.vsd
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/diagram/44501e.vsd?rev=1668369&view=auto
==============================================================================
Binary files poi/trunk/test-data/diagram/44501e.vsd (added) and poi/trunk/test-data/diagram/44501e.vsd Sun Mar 22 13:42:06 2015 differ
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org