Author: centic
Date: Sat Sep 16 08:20:38 2017
New Revision: 1808504
URL: http://svn.apache.org/viewvc?rev=1808504&view=rev
Log:
Add .git as excluded dir for integration-tests and add a local test for
XSSFBFileHandler to be able to manually test single files quickly
Modified:
poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java
poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFBFileHandler.java
Modified: poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java?rev=1808504&r1=1808503&r2=1808504&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java (original)
+++ poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java Sat Sep 16
08:20:38 2017
@@ -91,7 +91,7 @@ import org.junit.runners.Parameterized.P
public class TestAllFiles {
private static final File ROOT_DIR = new File("test-data");
- static final String[] SCAN_EXCLUDES = new String[] { "**/.svn/**",
"lost+found" };
+ static final String[] SCAN_EXCLUDES = new String[] { "**/.svn/**",
"lost+found", "**/.git/**" };
private static final Map<String,String> FILE_PASSWORD;
Modified:
poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFBFileHandler.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFBFileHandler.java?rev=1808504&r1=1808503&r2=1808504&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFBFileHandler.java
(original)
+++ poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFBFileHandler.java
Sat Sep 16 08:20:38 2017
@@ -16,11 +16,7 @@
==================================================================== */
package org.apache.poi.stress;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackageAccess;
@@ -28,6 +24,7 @@ import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.XLSBUnsupportedException;
import org.apache.poi.xssf.extractor.XSSFBEventBasedExcelExtractor;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.junit.Test;
public class XSSFBFileHandler extends AbstractFileHandler {
@@ -85,4 +82,16 @@ public class XSSFBFileHandler extends Ab
throw new RuntimeException("Should have gotten some text.");
}
}
+
+ @Test
+ public void testLocal() throws Exception {
+ File file = new File("test-data/spreadsheet/Simple.xlsb");
+ FileInputStream stream = new FileInputStream(file);
+ try {
+ handleFile(stream, file.getPath());
+ } finally {
+ stream.close();
+ }
+ handleExtracting(file);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]