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:
mindless committed 2010-04-30 21:09:41 +00:00
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));
}