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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to