]> source.dussan.org Git - poi.git/commitdiff
Integration test - fix filenames with windows path separator
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 17 Jan 2021 10:36:16 +0000 (10:36 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 17 Jan 2021 10:36:16 +0000 (10:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885595 13f79535-47bb-0310-9956-ffa450edef68

src/integrationtest/org/apache/poi/stress/StressMap.java

index 73d39b8530626a67d97b9dab081300163c65b23a..f69fbfbf4f8207b79f1c12b380e271c5790267cb 100644 (file)
@@ -64,7 +64,10 @@ public class StressMap {
     }
 
     public ExcInfo getExcInfo(String file, String testName, FileHandlerKnown handler) {
-        return exMap.get(file).stream()
+        // ... failures/handlers lookup doesn't work on windows otherwise
+        final String uniFile = file.replace('\\', '/');
+
+        return exMap.get(uniFile).stream()
             .filter(e -> e.isMatch(testName, handler.name()))
             .findFirst().orElse(null);
     }