commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1148172 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
Date Tue, 19 Jul 2011 05:17:03 GMT
Author: bayard
Date: Tue Jul 19 05:17:03 2011
New Revision: 1148172

URL: http://svn.apache.org/viewvc?rev=1148172&view=rev
Log:
Adding a unit test for LANG-729

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java?rev=1148172&r1=1148171&r2=1148172&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
Tue Jul 19 05:17:03 2011
@@ -32,6 +32,7 @@ import org.junit.Test;
 
 import org.apache.commons.lang3.text.translate.CharSequenceTranslator;
 import org.apache.commons.lang3.text.translate.NumericEntityEscaper;
+import org.apache.commons.lang3.text.translate.NumericEntityUnescaper;
 
 /**
  * Unit tests for {@link StringEscapeUtils}.
@@ -344,6 +345,17 @@ public class StringEscapeUtilsTest {
                 escapeXml.translate("\uD84C\uDFB4"));
     }
     
+    /**
+     * Reverse of the above.
+     *
+     * @see <a href="https://issues.apache.org/jira/browse/LANG-729">LANG-729</a>
+     */
+    @Test
+    public void testUnescapeXmlSupplementaryCharacters() {
+        assertEquals("Supplementary character must be represented using a single escape",
"\uD84C\uDFB4",
+                StringEscapeUtils.unescapeXml("&#144308;") );
+    }
+    
     // Tests issue #38569
     // http://issues.apache.org/bugzilla/show_bug.cgi?id=38569
     @Test



Mime
View raw message