Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-06-04 16:42:38 -0400
committerspingel2010-06-04 16:42:38 -0400
commit8cc18e65e7798d2ad18071d177afe64f15c672d8 (patch)
treede46d65befda14909edd21e398c38956280806be /org.eclipse.mylyn.bugzilla.tests
parentfb9913dc5ea8569d244c0f8dab26b97c7923bf25 (diff)
downloadorg.eclipse.mylyn.tasks-8cc18e65e7798d2ad18071d177afe64f15c672d8.tar.gz
org.eclipse.mylyn.tasks-8cc18e65e7798d2ad18071d177afe64f15c672d8.tar.xz
org.eclipse.mylyn.tasks-8cc18e65e7798d2ad18071d177afe64f15c672d8.zip
RESOLVED - bug 279536: bugzilla hyperlink detector should detect attachment hyperlinks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279536
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaHyperlinkDetectorTest.java9
1 files changed, 8 insertions, 1 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 5cb276c3b..c0140a506 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
@@ -11,6 +11,8 @@
package org.eclipse.mylyn.bugzilla.tests.ui;
+import java.util.Arrays;
+
import junit.framework.TestCase;
import org.eclipse.jface.text.Region;
@@ -42,7 +44,8 @@ public class BugzillaHyperlinkDetectorTest extends TestCase {
private void assertHyperlinks(String string, IHyperlink... expected) {
IHyperlink[] links = connector.findHyperlinks(repository, task, string, -1, 0);
if (expected.length == 0) {
- assertNull(links);
+ assertNull("Expected no hyperlinks, but got: " + ((links != null) ? Arrays.asList(links).toString() : ""),
+ links);
return;
}
assertNotNull("Expected hyperlinks in " + string, links);
@@ -129,6 +132,10 @@ public class BugzillaHyperlinkDetectorTest extends TestCase {
assertHyperlinks("bug 123 bug 456", link(0, 7, "123"), link(20, 7, "456"));
}
+ public void testFindHyperlinksLinebreak() {
+ assertHyperlinks("bug\n456");
+ }
+
public void testFindHyperlinksNoAttachment() {
assertHyperlinks("attachment");
assertHyperlinks("attachmen 123");

Back to the top