Fixing test to use the right escaper; numeric entities and not unicode. LANG-728

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1148167 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2011-07-19 05:10:03 +00:00
parent 1a22532991
commit 5997452fe7
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.apache.commons.lang3.text.translate.CharSequenceTranslator;
import org.apache.commons.lang3.text.translate.UnicodeEscaper;
import org.apache.commons.lang3.text.translate.NumericEntityEscaper;
/**
* Unit tests for {@link StringEscapeUtils}.
@ -338,9 +338,9 @@ public class StringEscapeUtilsTest {
@Test
public void testEscapeXmlSupplementaryCharacters() {
CharSequenceTranslator escapeXml =
StringEscapeUtils.ESCAPE_XML.with( UnicodeEscaper.between(0x7f, Integer.MAX_VALUE) );
StringEscapeUtils.ESCAPE_XML.with( NumericEntityEscaper.between(0x7f, Integer.MAX_VALUE) );
assertEquals("Supplementary character must be represented using a single escape", "\u233B4",
assertEquals("Supplementary character must be represented using a single escape", "𣎴",
escapeXml.translate("\uD84C\uDFB4"));
}