提交 36a60e2c 编写于 作者: K kohsuke

added a regression test.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2736 71c3de6d-444a-0410-be80-ed276b4c234a
上级 5501de6a
......@@ -696,8 +696,6 @@ public class SubversionSCM extends SCM implements Serializable {
}.process();
}
private static final Pattern URL_PATTERN = Pattern.compile("(https?|svn(\\+\\w+)?|file)://.+");
/**
* validate the value for a local location (local checkout directory).
*/
......@@ -730,6 +728,8 @@ public class SubversionSCM extends SCM implements Serializable {
}
}
static final Pattern URL_PATTERN = Pattern.compile("(https?|svn(\\+[a-z0-9]+)?|file)://.+");
private static final long serialVersionUID = 1L;
private static final Logger logger = Logger.getLogger(SubversionSCM.class.getName());
......
package hudson.scm;
import junit.framework.TestCase;
/**
* @author Kohsuke Kawaguchi
*/
public class SubversionSCMTest extends TestCase {
public void test1() {
check("http://foobar/");
check("https://foobar/");
check("file://foobar/");
check("svn://foobar/");
check("svn+ssh://foobar/");
}
private void check(String url) {
assertTrue(SubversionSCM.URL_PATTERN.matcher(url).matches());
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册