Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-02-25 12:51:58 -0500
committerChris Goldthorpe2011-02-25 12:51:58 -0500
commit6954a216bfa05fb8ce639426c60a2c5d211e1512 (patch)
tree0d4da98da7e9c44f4b53b4be89fff6755ca5dff5
parent7671604f0f7c92f5630992d60de43a9df265989d (diff)
downloadeclipse.platform.ua-6954a216bfa05fb8ce639426c60a2c5d211e1512.tar.gz
eclipse.platform.ua-6954a216bfa05fb8ce639426c60a2c5d211e1512.tar.xz
eclipse.platform.ua-6954a216bfa05fb8ce639426c60a2c5d211e1512.zip
Add more tests for htmlEncode()v20110228
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HtmlCoderTest.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HtmlCoderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HtmlCoderTest.java
index f83fec8e8..8d8767814 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HtmlCoderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HtmlCoderTest.java
@@ -102,7 +102,7 @@ public class HtmlCoderTest extends TestCase {
String encoded = UrlUtil.htmlEncode(source);
assertNotSame(source, encoded);
}
-
+
/**
* Verify that CR is encoded
*/
@@ -112,4 +112,22 @@ public class HtmlCoderTest extends TestCase {
assertNotSame(source, encoded);
}
+ /**
+ * Verify that accented character is not encoded
+ */
+ public void testNoEncodeAccented() {
+ final String source = "\u00c1";
+ String encoded = UrlUtil.htmlEncode(source);
+ assertEquals(source, encoded);
+ }
+
+ /**
+ * Verify that Chinese character is not encoded
+ */
+ public void testNoEncodeChinese() {
+ final String source = "\u4e01";
+ String encoded = UrlUtil.htmlEncode(source);
+ assertEquals(source, encoded);
+ }
+
}

Back to the top