1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

adds test for unicode that has surrogate pairs

This commit is contained in:
John J. Aylward 2016-09-22 16:12:00 -04:00
parent 2b87f334d0
commit f6a00e94c7

View file

@ -281,6 +281,7 @@ public class XMLTest {
"<euroX>A &#x20ac;22&#x20AC;</euroX>"+ "<euroX>A &#x20ac;22&#x20AC;</euroX>"+
"<unknown>some text &copy;</unknown>"+ "<unknown>some text &copy;</unknown>"+
"<known>&#x0022; &quot; &amp; &apos; &lt; &gt;</known>"+ "<known>&#x0022; &quot; &amp; &apos; &lt; &gt;</known>"+
"<high>&#x1D122; &#x10165;</high>" +
"</root>"; "</root>";
String expectedStr = String expectedStr =
"{\"root\":{" + "{\"root\":{" +
@ -288,7 +289,8 @@ public class XMLTest {
"\"euro\":\"A €33\"," + "\"euro\":\"A €33\"," +
"\"euroX\":\"A €22€\"," + "\"euroX\":\"A €22€\"," +
"\"unknown\":\"some text &copy;\"," + "\"unknown\":\"some text &copy;\"," +
"\"known\":\"\\\" \\\" & ' < >\"" + "\"known\":\"\\\" \\\" & ' < >\"," +
"\"high\":\"𝄢 𐅥\""+
"}}"; "}}";
compareStringToJSONObject(xmlStr, expectedStr); compareStringToJSONObject(xmlStr, expectedStr);