Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-24400] ClasspathEntryTest#pathURLConversion fails on Windows #5

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -24,14 +24,19 @@

package org.jenkinsci.plugins.scriptsecurity.scripts;

import hudson.Functions;
import java.net.URL;
import org.junit.Test;
import static org.junit.Assert.*;

public class ClasspathEntryTest {

@Test public void pathURLConversion() throws Exception {
assertRoundTrip("/tmp/x.jar", "file:/tmp/x.jar");
if (!Functions.isWindows()) {
assertRoundTrip("/tmp/x.jar", "file:/tmp/x.jar");
} else {
assertRoundTrip("C:\\tmp\\x.jar", "file:/C:/tmp/x.jar");
}
assertEquals("jar:file:/tmp/x.jar!/subjar.jar", "jar:file:/tmp/x.jar!/subjar.jar");
}
private static void assertRoundTrip(String path, String url) throws Exception {
Expand Down