diff --git a/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java index bdb091694..dcdcbed6b 100644 --- a/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java @@ -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 LANG-729 + */ + @Test + public void testUnescapeXmlSupplementaryCharacters() { + assertEquals("Supplementary character must be represented using a single escape", "\uD84C\uDFB4", + StringEscapeUtils.unescapeXml("𣎴") ); + } + // Tests issue #38569 // http://issues.apache.org/bugzilla/show_bug.cgi?id=38569 @Test