diff options
author | Stephen Elsemore | 2013-06-25 10:14:56 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-08-01 16:57:44 -0400 |
commit | b55ba73481f324bd04e780bc05a8adae312d84af (patch) | |
tree | 234d9fb7f5922dd6f18c66fc089dee6318837a4d /org.eclipse.mylyn.bugzilla.tests/src | |
parent | 0fe431cf30eb7ab09f6cc552d3c15c4d4f21c5be (diff) | |
download | org.eclipse.mylyn.tasks-b55ba73481f324bd04e780bc05a8adae312d84af.tar.gz org.eclipse.mylyn.tasks-b55ba73481f324bd04e780bc05a8adae312d84af.tar.xz org.eclipse.mylyn.tasks-b55ba73481f324bd04e780bc05a8adae312d84af.zip |
411420: Improve hyperlink detection
Improve regex so that "Bug: <bugId>" pattern, commonly used in commit
messages, is recognized.
Bug: 411420
Change-Id: I3f16b180c10bff46e59e63a908ea766a10ce4f21
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=411420
Signed-off-by: Stephen Elsemore <selsemore@collab.net>
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaHyperlinkDetectorTest.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaHyperlinkDetectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaHyperlinkDetectorTest.java index 7652ad525..3e8f561ac 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaHyperlinkDetectorTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaHyperlinkDetectorTest.java @@ -112,6 +112,8 @@ public class BugzillaHyperlinkDetectorTest extends TestCase { assertHyperlinks("bug 123", link(0, 8, "123")); assertHyperlinks("bug#123", link(0, 7, "123")); assertHyperlinks("bug # 123", link(0, 11, "123")); + assertHyperlinks("Bug: 123", link(0, 8, "123")); + assertHyperlinks("bug: 123", link(0, 8, "123")); } public void testFindHyperlinksTask() { @@ -151,6 +153,7 @@ public class BugzillaHyperlinkDetectorTest extends TestCase { public void testFindHyperlinksMultiple() { assertHyperlinks("bug 456#comment#12", link(0, 7, "456"), link(8, 10, "123", "12")); assertHyperlinks("bug 123 bug 456", link(0, 7, "123"), link(20, 7, "456")); + assertHyperlinks("bug: 123 bug: 456", link(0, 8, "123"), link(21, 8, "456")); } public void testFindHyperlinksLinebreak() { |