Add more test-files from bug 44501, all seem to work fine now

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1668369 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2015-03-22 13:42:06 +00:00
parent 0850e7d846
commit d6f8268e56
6 changed files with 19 additions and 1 deletions

View File

@ -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();
}
}
}

BIN
test-data/diagram/44501a.vsd Executable file

Binary file not shown.

BIN
test-data/diagram/44501b.vsd Executable file

Binary file not shown.

Binary file not shown.

BIN
test-data/diagram/44501d.vsd Executable file

Binary file not shown.

Binary file not shown.