aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2021-03-24 09:30:34 +0000
committerDominik Stadler <centic@apache.org>2021-03-24 09:30:34 +0000
commite8895c56b14b8a7f6c6006a92afd138aa2f44860 (patch)
treee84e9e94fefd7ef7bb4be22b584afc1625950e42 /src
parent7c6e80e9036d55382d87feda7cee9d5110c7df7c (diff)
downloadpoi-e8895c56b14b8a7f6c6006a92afd138aa2f44860.tar.gz
poi-e8895c56b14b8a7f6c6006a92afd138aa2f44860.zip
Make new tests for IOUtils work on Windows as well
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887997 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/testcases/org/apache/poi/util/TestIOUtils.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testcases/org/apache/poi/util/TestIOUtils.java b/src/testcases/org/apache/poi/util/TestIOUtils.java
index 4c9f6a1fb7..19b64dd3c1 100644
--- a/src/testcases/org/apache/poi/util/TestIOUtils.java
+++ b/src/testcases/org/apache/poi/util/TestIOUtils.java
@@ -202,7 +202,11 @@ final class TestIOUtils {
void testCopyToInvalidFile() throws IOException {
try (InputStream is = new FileInputStream(TMP)) {
assertThrows(RuntimeException.class,
- () -> IOUtils.copy(is, new File("/notexisting/directory/structure")));
+ () -> {
+ // try with two different paths so we fail on both Unix and Windows
+ IOUtils.copy(is, new File("/notexisting/directory/structure"));
+ IOUtils.copy(is, new File("c:\\note&/()\"§=§%&!§$81§0_:;,.-'#*+~`?ß´ß0´ß9243xisting\\directory\\structure"));
+ });
}
}