LANG-911 UTF8 4byte (un)escapeJava not work correctly
Add test to show that the bug report is incorrect git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1518116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9506e04548
commit
62f2412f14
|
@ -530,6 +530,17 @@ public class StringEscapeUtilsTest {
|
|||
assertEquals(input, escaped);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests https://issues.apache.org/jira/browse/LANG-911
|
||||
*/
|
||||
@Test
|
||||
public void testLang911() {
|
||||
String bellsTest = "\ud83d\udc80\ud83d\udd14";
|
||||
String value = StringEscapeUtils.escapeJava(bellsTest);
|
||||
String valueTest = StringEscapeUtils.unescapeJava(value);
|
||||
assertEquals(bellsTest, valueTest);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEscapeJson() {
|
||||
assertEquals(null, StringEscapeUtils.escapeJson(null));
|
||||
|
|
Loading…
Reference in New Issue