[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 30/58] check-qjson: Fix and enable utf8_string()'
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v3 30/58] check-qjson: Fix and enable utf8_string()'s disabled part |
Date: |
Thu, 23 Aug 2018 18:39:57 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
tests/check-qjson.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 343f8af36a..defc21fa04 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -776,15 +776,10 @@ static void utf8_string(void)
qobject_unref(str);
g_free(jstr);
- /*
- * Parse @json_out right back
- * Disabled, because qobject_from_json() is buggy, and I can't
- * be bothered to add the expected incorrect results.
- * FIXME Enable once these bugs have been fixed.
- */
- if (0 && json_out != json_in) {
+ /* Parse @json_out right back, unless it has replacements */
+ if (!strstr(json_out, "\\uFFFD")) {
str = from_json_str(json_out, j, &error_abort);
- g_assert_cmpstr(qstring_get_try_str(str), ==, utf8_out);
+ g_assert_cmpstr(qstring_get_try_str(str), ==, utf8_in);
}
}
}
--
2.17.1
- [Qemu-devel] [PATCH v3 18/58] json: Reject unescaped control characters, (continued)
- [Qemu-devel] [PATCH v3 18/58] json: Reject unescaped control characters, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 35/58] json: Don't pass null @tokens to json_parser_parse(), Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 36/58] json: Don't create JSON_ERROR tokens that won't be used, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 27/58] json: Simplify parse_string(), Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 10/58] check-qjson: Cover escaped characters more thoroughly, part 2, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 16/58] check-qjson: Cover interpolation more thoroughly, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 25/58] json: Accept overlong \xC0\x80 as U+0000 ("modified UTF-8"), Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 04/58] check-qjson: Cover whitespace more thoroughly, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 13/58] check-qjson: Simplify utf8_string(), Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 32/58] json-parser: simplify and avoid JSONParserContext allocation, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 30/58] check-qjson: Fix and enable utf8_string()'s disabled part,
Markus Armbruster <=
- [Qemu-devel] [PATCH v3 08/58] check-qjson: Cover escaped characters more thoroughly, part 1, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 07/58] test-qga: Clean up how we test QGA synchronization, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 15/58] check-qjson qmp-test: Cover control characters more thoroughly, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 24/58] json: Leave rejecting invalid UTF-8 to parser, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 05/58] qmp-cmd-test: Split off qmp-test, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 23/58] json: Report first rather than last parse error, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 14/58] check-qjson: Fix utf8_string() to test all invalid sequences, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 11/58] check-qjson: Consolidate partly redundant string tests, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 01/58] docs/interop/qmp-spec: How to force known good parser state, Markus Armbruster, 2018/08/23
- [Qemu-devel] [PATCH v3 20/58] json: Tighten and simplify qstring_from_escaped_str()'s loop, Markus Armbruster, 2018/08/23