You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2021/03/24 09:30:34 UTC

svn commit: r1887997 - /poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java

Author: centic
Date: Wed Mar 24 09:30:34 2021
New Revision: 1887997

URL: http://svn.apache.org/viewvc?rev=1887997&view=rev
Log:
Make new tests for IOUtils work on Windows as well

Modified:
    poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java

Modified: poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java?rev=1887997&r1=1887996&r2=1887997&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java Wed Mar 24 09:30:34 2021
@@ -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"));
+                    });
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org