Skip to content

Commit f6a00e9

Browse files
author
John J. Aylward
committed
adds test for unicode that has surrogate pairs
1 parent 2b87f33 commit f6a00e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/json/junit/XMLTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,16 @@ public void testXmlEscapeToJson(){
281281
"<euroX>A &#x20ac;22&#x20AC;</euroX>"+
282282
"<unknown>some text &copy;</unknown>"+
283283
"<known>&#x0022; &quot; &amp; &apos; &lt; &gt;</known>"+
284+
"<high>&#x1D122; &#x10165;</high>" +
284285
"</root>";
285286
String expectedStr =
286287
"{\"root\":{" +
287288
"\"rawQuote\":\"\\\"\"," +
288289
"\"euro\":\"A €33\"," +
289290
"\"euroX\":\"A €22€\"," +
290291
"\"unknown\":\"some text &copy;\"," +
291-
"\"known\":\"\\\" \\\" & ' < >\"" +
292+
"\"known\":\"\\\" \\\" & ' < >\"," +
293+
"\"high\":\"𝄢 𐅥\""+
292294
"}}";
293295

294296
compareStringToJSONObject(xmlStr, expectedStr);

0 commit comments

Comments
 (0)