提交 da5faae4 编写于 作者: K kohsuke

added a regression test for HUDSON-6252

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30236 71c3de6d-444a-0410-be80-ed276b4c234a
上级 58c3ceff
......@@ -2,6 +2,7 @@ package hudson.console;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.Launcher;
import hudson.MarkupText;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.model.FreeStyleBuild;
......@@ -34,4 +35,15 @@ public class UrlAnnotatorTest extends HudsonTestCase {
assertTrue(rsp, rsp.contains("<a href='http://www.kohsuke.org/'>http://www.kohsuke.org/</a>"));
assertTrue(rsp, rsp.contains("<a href='http://www.oracle.com/'>http://www.oracle.com/</a>"));
}
/**
* Mark up of URL should consider surrounding markers, if any.
*/
public void test2() throws Exception {
MarkupText m = new MarkupText("{abc='http://url/',def='ghi'}");
new UrlAnnotator().newInstance(null).annotate(null,m);
String html = m.toString(false);
assertTrue(html.contains("<a href='http://url/'>http://url/</a>"));
System.out.println(html);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册