Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-10-14 00:10:52 +0000
committerSteffen Pingel2011-10-14 00:10:52 +0000
commit406e77192a6aac6e9df7f0437f09b8f9475be5ab (patch)
tree89af8d619e6175d16bb78b6d25f7f56a2091d97b /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn
parent734eb4cb489f54feade38091a3248ee7818a9db5 (diff)
downloadorg.eclipse.mylyn.tasks-406e77192a6aac6e9df7f0437f09b8f9475be5ab.tar.gz
org.eclipse.mylyn.tasks-406e77192a6aac6e9df7f0437f09b8f9475be5ab.tar.xz
org.eclipse.mylyn.tasks-406e77192a6aac6e9df7f0437f09b8f9475be5ab.zip
NEW - bug 162094: [upstream] query by milestone returns no result when
milestone name includes ampersand https://bugs.eclipse.org/bugs/show_bug.cgi?id=162094
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracSearchTest.java20
2 files changed, 20 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
index b87ef64e5..fb11a4c3f 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
@@ -168,10 +168,6 @@ public class TracClientTest extends TestCase {
}
public void testSearchMilestoneAmpersand() throws Exception {
- // XXX re-enable for XML-RPC when bug 162094 is resolved
- if (client.getAccessMode() == Version.XML_RPC) {
- return;
- }
TracSearch search = new TracSearch();
search.addFilter("milestone", "mile&stone");
search.setOrderBy("id");
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracSearchTest.java
index ced5053a0..7371f3d7c 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracSearchTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracSearchTest.java
@@ -133,4 +133,24 @@ public class TracSearchTest extends TestCase {
assertEquals("&order=summary" + QUERY1, search1.toQuery());
}
+ public void testToQueryAmpersand() {
+ TracSearch search = new TracSearch();
+ search.addFilter("milestone", "mile&stone&");
+ assertEquals("&milestone=mile\\&stone\\&", search.toQuery());
+ }
+
+ public void testToQueryPipe() {
+ TracSearch search = new TracSearch();
+ search.addFilter("field", "|pipes||");
+ assertEquals("&field=\\|pipes\\|\\|", search.toQuery());
+ }
+
+ public void testToQueryPipeAmpersand() {
+ TracSearch search = new TracSearch();
+ search.addFilter("pipe", "|");
+ search.addFilter("amp", "&");
+ search.addFilter("amppipe", "|&");
+ assertEquals("&pipe=\\|&amp=\\&&amppipe=\\|\\&", search.toQuery());
+ }
+
}

Back to the top