Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-11-11 20:19:19 +0000
committerspingel2008-11-11 20:19:19 +0000
commitf7bb8f7f9c843890650f7c14bac62bfe6a453cbb (patch)
tree168ae8e1ce3ed53a2dbc384b29ae1b5448616138 /org.eclipse.mylyn.trac.tests
parenta8ce808d9394dcf0e5af0127113f0382b78e58b5 (diff)
downloadorg.eclipse.mylyn.tasks-f7bb8f7f9c843890650f7c14bac62bfe6a453cbb.tar.gz
org.eclipse.mylyn.tasks-f7bb8f7f9c843890650f7c14bac62bfe6a453cbb.tar.xz
org.eclipse.mylyn.tasks-f7bb8f7f9c843890650f7c14bac62bfe6a453cbb.zip
NEW - bug 254862: Trac attachments containing spaces result in bad urls
https://bugs.eclipse.org/bugs/show_bug.cgi?id=254862
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracUtilTest.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracUtilTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracUtilTest.java
index 911b506c6..1eeb8441a 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracUtilTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracUtilTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2006, 2008 Steffen Pingel and others.
+ * Copyright (c) 2006, 2008 Steffen Pingel and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -66,4 +66,13 @@ public class TracUtilTest extends TestCase {
assertEquals("milestone", filter.getFieldName());
assertEquals(Arrays.asList("0.1"), filter.getValues());
}
+
+ public void testEncodeUrl() {
+ assertEquals("encode", TracUtil.encodeUrl("encode"));
+ assertEquals("sp%20ace%20", TracUtil.encodeUrl("sp ace "));
+ assertEquals("%2B%2B", TracUtil.encodeUrl("++"));
+ assertEquals("%2520", TracUtil.encodeUrl("%20"));
+ assertEquals("%2Fslash", TracUtil.encodeUrl("/slash"));
+ }
+
}

Back to the top