summary refs log tree commit diff stats
path: root/tests/check-qjson.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-23 18:39:56 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-24 20:26:37 +0200
commitdc45a07c3628b82817a96fcb7df3d211d901af5d (patch)
tree40ee7798ace8af8749b416e00ee7eb4db87e8aad /tests/check-qjson.c
parent46a628b1398ae6a58d6847223736431225c4c0cc (diff)
downloadfocaccia-qemu-dc45a07c3628b82817a96fcb7df3d211d901af5d.tar.gz
focaccia-qemu-dc45a07c3628b82817a96fcb7df3d211d901af5d.zip
json: Fix \uXXXX for surrogate pairs
The JSON parser treats each half of a surrogate pair as unpaired
surrogate.  Fix it to recognize surrogate pairs.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-30-armbru@redhat.com>
Diffstat (limited to 'tests/check-qjson.c')
-rw-r--r--tests/check-qjson.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 4abb5847ad..343f8af36a 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -63,8 +63,7 @@ static void escaped_string(void)
         { "double byte utf-8 \\u00A2", "double byte utf-8 \xc2\xa2" },
         { "triple byte utf-8 \\u20AC", "triple byte utf-8 \xe2\x82\xac" },
         { "quadruple byte utf-8 \\uD834\\uDD1E", /* U+1D11E */
-          /* bug: want \xF0\x9D\x84\x9E */
-          NULL },
+          "quadruple byte utf-8 \xF0\x9D\x84\x9E" },
         { "\\", NULL },
         { "\\z", NULL },
         { "\\ux", NULL },