mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
add SubText.groupCount()
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30578 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
cd8376e9b4
commit
a6e6c7946a
2 files changed
+11
-1
No files matched your search
@@ -35,8 +35,10 @@ import java.util.regex.Pattern;
|
||||
public class MarkupTextTest extends TestCase {
|
||||
public void test1() {
|
||||
MarkupText t = new MarkupText("I fixed issue #155. The rest is trick text: xissue #155 issue #123x");
|
||||
for (SubText st : t.findTokens(pattern))
|
||||
for (SubText st : t.findTokens(pattern)) {
|
||||
assertEquals(1, st.groupCount());
|
||||
st.surroundWith("<$1>","<$1>");
|
||||
}
|
||||
|
||||
assertEquals("I fixed <155>issue #155<155>. The rest is trick text: xissue #155 issue #123x", t.toString(false));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user