Skip to content

Commit

Permalink
Fix test for SVNCommands some more for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
centic9 committed Jun 21, 2017
1 parent b9fa181 commit f9e90f5
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/test/java/org/dstadler/commons/svn/SVNCommandsTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
package org.dstadler.commons.svn;

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

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import java.util.TimeZone;
import java.util.logging.Logger;

import org.apache.commons.exec.CommandLine;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.dstadler.commons.exec.ExecutionHelper;
import org.dstadler.commons.logging.jdk.LoggerFactory;
Expand All @@ -12,20 +27,6 @@
import org.junit.Test;
import org.xml.sax.SAXException;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import java.util.TimeZone;
import java.util.logging.Logger;

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 {
private final static Logger log = LoggerFactory.make();

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

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

0 comments on commit f9e90f5

Please sign in to comment.