From e8895c56b14b8a7f6c6006a92afd138aa2f44860 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 24 Mar 2021 09:30:34 +0000 Subject: [PATCH] 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 --- src/testcases/org/apache/poi/util/TestIOUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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")); + }); } } -- 2.39.5