aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2021-03-24 16:07:33 +0000
committerDominik Stadler <centic@apache.org>2021-03-24 16:07:33 +0000
commit5866b2129c936948f455373d1bbd35121b2ea20d (patch)
treea98c3a8160a591b7f7f97292e031b012dc36acb3 /src
parent799dfc40f4b9acf94d2825e6ea3a9ff27680bb05 (diff)
downloadpoi-5866b2129c936948f455373d1bbd35121b2ea20d.tar.gz
poi-5866b2129c936948f455373d1bbd35121b2ea20d.zip
Make "normalizing" the file-path actually work
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888021 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java2
-rw-r--r--src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java b/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
index 72f99c3f05..01a4ebc82d 100644
--- a/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
@@ -89,7 +89,7 @@ public abstract class AbstractFileHandler implements FileHandler {
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);
diff --git a/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java b/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
index def8750c84..beb3a8edf8 100644
--- a/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
@@ -223,6 +223,11 @@ class XSSFFileHandler extends SpreadsheetHandler {
}
@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"));
}