poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1738460 - /poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java
Date Sun, 10 Apr 2016 20:21:55 GMT
Author: onealj
Date: Sun Apr 10 20:21:55 2016
New Revision: 1738460

URL: http://svn.apache.org/viewvc?rev=1738460&view=rev
Log:
ignore VBA source files in integration test

Modified:
    poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.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=1738460&r1=1738459&r2=1738460&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java (original)
+++ poi/trunk/src/integrationtest/org/apache/poi/TestAllFiles.java Sun Apr 10 20:21:55 2016
@@ -28,11 +28,14 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
 import org.apache.poi.hwpf.OldWordFileFormatException;
 import org.apache.poi.stress.*;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.tools.ant.DirectoryScanner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -66,6 +69,8 @@ import org.junit.runners.Parameterized.P
  */
 @RunWith(Parameterized.class)
 public class TestAllFiles {
+    private final static POILogger logger = POILogFactory.getLogger(TestAllFiles.class);
+
     private static final File ROOT_DIR = new File("test-data");
 
     static final String[] SCAN_EXCLUDES = new String[] { "**/.svn/**", "lost+found" };
@@ -158,6 +163,12 @@ public class TestAllFiles {
         HANDLERS.put(".xml", new NullFileHandler());
         HANDLERS.put(".csv", new NullFileHandler());
         HANDLERS.put(".ods", new NullFileHandler());
+        // VBA source files
+        HANDLERS.put(".vba", new NullFileHandler());
+        HANDLERS.put(".bas", new NullFileHandler());
+        HANDLERS.put(".frm", new NullFileHandler());
+        HANDLERS.put(".frx", new NullFileHandler()); //binary
+        HANDLERS.put(".cls", new NullFileHandler());
 
         // map some files without extension
         HANDLERS.put("spreadsheet/BigSSTRecord", new NullFileHandler());
@@ -317,6 +328,7 @@ public class TestAllFiles {
 
     @Test
     public void testAllFiles() throws Exception {
+        logger.log(POILogger.INFO, "Reading " + file + " with " + handler.getClass());
         assertNotNull("Unknown file extension for file: " + file + ": " + getExtension(file),
handler);
         File inputFile = new File(ROOT_DIR, file);
 
@@ -368,7 +380,7 @@ public class TestAllFiles {
             return file;
         }
 
-        return file.substring(pos).toLowerCase();
+        return file.substring(pos).toLowerCase(Locale.ROOT);
     }
 
     private static class NullFileHandler implements FileHandler {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message