garydgregory commented on a change in pull request #784:
URL: https://github.com/apache/logging-log4j2/pull/784#discussion_r819963513
##########
File path:
log4j-core/src/test/java/org/apache/logging/log4j/core/util/NetUtilsTest.java
##########
@@ -17,24 +17,41 @@
package org.apache.logging.log4j.core.util;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.EnabledOnOs;
-import org.junit.jupiter.api.condition.OS;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import java.io.File;
import java.net.URI;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledOnOs;
+import org.junit.jupiter.api.condition.OS;
public class NetUtilsTest {
@Test
public void testToUriWithoutBackslashes() {
final String config = "file:///path/to/something/on/unix";
- final URI uri = NetUtils.toURI(config);
+ URI uri = NetUtils.toURI(config);
assertNotNull(uri, "The URI should not be null.");
assertEquals("file:///path/to/something/on/unix", uri.toString(), "The
URI is not correct.");
+
+ final String properUriPath = "/path/without/spaces";
+ uri = NetUtils.toURI(properUriPath);
+
+ assertNotNull(uri, "The URI should not be null.");
+ assertEquals(properUriPath, uri.toString(), "The URI is not correct.");
+ }
+
+ @Test
+ @EnabledOnOs({OS.LINUX, OS.AIX, OS.MAC, OS.SOLARIS})
Review comment:
Why the OS restriction?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]