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 2023/10/13 09:25:13 UTC
svn commit: r1912933 - in /poi/trunk: poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java test-data/spreadsheet/stress.xls
Author: centic
Date: Fri Oct 13 09:25:13 2023
New Revision: 1912933
URL: http://svn.apache.org/viewvc?rev=1912933&view=rev
Log:
integration-tests: Enable testing extracting for OPCFileHandler and fix single test
Enable running "extract" also for OPCFileHandler
Add additional expected failures in stress.xls
Modified:
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
poi/trunk/test-data/spreadsheet/stress.xls
Modified: poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java?rev=1912933&r1=1912932&r2=1912933&view=diff
==============================================================================
--- poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java (original)
+++ poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java Fri Oct 13 09:25:13 2023
@@ -19,10 +19,11 @@ package org.apache.poi.stress;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import java.io.BufferedInputStream;
import java.io.File;
-import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PushbackInputStream;
+import java.nio.file.Files;
import java.util.Set;
import org.apache.poi.openxml4j.opc.ContentTypes;
@@ -61,17 +62,13 @@ public class OPCFileHandler extends Abst
}
}
- @Override
- public void handleExtracting(File file) {
- // text-extraction is not possible currently for these types of files
- }
-
// a test-case to test this locally without executing the full TestAllFiles
@Test
void test() throws Exception {
File file = new File("test-data/diagram/test.vsdx");
- try (InputStream stream = new PushbackInputStream(new FileInputStream(file), 100000)) {
+ try (InputStream stream = new BufferedInputStream(
+ new PushbackInputStream(Files.newInputStream(file.toPath()), 100000))) {
handleFile(stream, file.getPath());
}
Modified: poi/trunk/test-data/spreadsheet/stress.xls
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/stress.xls?rev=1912933&r1=1912932&r2=1912933&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org