Skip to content

Commit

Permalink
Fix test for SVNCommands on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
centic9 committed Jun 19, 2017
1 parent cc2483f commit b9fa181
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/test/java/org/dstadler/commons/svn/SVNCommandsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import java.util.TimeZone;
import java.util.logging.Logger;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

public class SVNCommandsTest {
Expand Down Expand Up @@ -61,12 +63,14 @@ public class SVNCommandsTest {
throw new RuntimeException(e);
}

BASE_URL = "file://" + repoDir.getAbsolutePath() + "/project1";
BASE_URL = "file://" + repoDir.getAbsolutePath().
// local URL on Windows has limitations
replace("\\", "/").replace("c:/", "/") + "/project1";
log.info("Using baseUrl " + BASE_URL);

try {
// checkout to 2nd directory
try (InputStream result = SVNCommands.checkout("file://" + repoDir.getAbsolutePath() + "/project1",
try (InputStream result = SVNCommands.checkout(BASE_URL,
svnRepoDir, USERNAME, PASSWORD)) {
log.info("Svn-checkout reported:\n" + SVNCommands.extractResult(result));
}
Expand Down

0 comments on commit b9fa181

Please sign in to comment.