Author: centic
Date: Wed Mar 24 16:07:33 2021
New Revision: 1888021

URL: http://svn.apache.org/viewvc?rev=1888021&view=rev
Log:
Make "normalizing" the file-path actually work

Modified:
    poi/trunk/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
    poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java

Modified: 
poi/trunk/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java?rev=1888021&r1=1888020&r2=1888021&view=diff
==============================================================================
--- 
poi/trunk/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java 
(original)
+++ 
poi/trunk/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java 
Wed Mar 24 16:07:33 2021
@@ -89,7 +89,7 @@ public abstract class AbstractFileHandle
         String fileAndParentName = file.getParentFile().getName() + "/" + 
file.getName();
         try {
             // fix windows absolute paths for exception message tracking
-            String relPath = file.getPath().replace(".*test-data", 
"test-data").replace('\\', '/');
+            String relPath = file.getPath().replaceAll(".*test-data", 
"test-data").replace('\\', '/');
             extractor = ExtractorFactory.createExtractor(file);
             assertNotNull(extractor, "Should get a POITextExtractor but had 
none for file " + relPath);
 

Modified: 
poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java?rev=1888021&r1=1888020&r2=1888021&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java 
(original)
+++ poi/trunk/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java 
Wed Mar 24 16:07:33 2021
@@ -223,6 +223,11 @@ class XSSFFileHandler extends Spreadshee
     }
 
     @Test
+    void testExtracting() throws Exception {
+        handleExtracting(new File("test-data/spreadsheet/ref-56737.xlsx"));
+    }
+
+    @Test
     void testAdditional() throws Exception {
         handleAdditional(new File("test-data/spreadsheet/poc-xmlbomb.xlsx"));
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to