[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/56] check-qjson: Streamline escaped_string()'s te
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH 08/56] check-qjson: Streamline escaped_string()'s test strings |
Date: |
Wed, 8 Aug 2018 14:02:46 +0200 |
Merge a few closely related test strings, and drop a few redundant
ones.
Signed-off-by: Markus Armbruster <address@hidden>
---
tests/check-qjson.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 1c7f24bc4d..8f51f57af9 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -54,18 +54,8 @@ static void escaped_string(void)
const char *utf8_out;
int skip;
} test_cases[] = {
- { "\\b", "\b" },
- { "\\f", "\f" },
- { "\\n", "\n" },
- { "\\r", "\r" },
- { "\\t", "\t" },
- { "/", "/" },
- { "\\/", "/", .skip = 1 },
- { "\\\\", "\\" },
- { "\\\"", "\"" },
- { "hello world \\\"embedded string\\\"",
- "hello world \"embedded string\"" },
- { "hello world\\nwith new line", "hello world\nwith new line" },
+ { "\\b\\f\\n\\r\\t\\\\\\\"", "\b\f\n\r\t\\\"" },
+ { "\\/\\'", "/'", .skip = 1 },
{ "single byte utf-8 \\u0020", "single byte utf-8 ", .skip = 1 },
{ "double byte utf-8 \\u00A2", "double byte utf-8 \xc2\xa2" },
{ "triple byte utf-8 \\u20AC", "triple byte utf-8 \xe2\x82\xac" },
--
2.17.1
- [Qemu-devel] [PATCH 16/56] json: Fix lexer to include the bad character in JSON_ERROR token, (continued)
- [Qemu-devel] [PATCH 16/56] json: Fix lexer to include the bad character in JSON_ERROR token, Markus Armbruster, 2018/08/08
- [Qemu-devel] [PATCH 03/56] check-qjson: Cover whitespace more thoroughly, Markus Armbruster, 2018/08/08
- [Qemu-devel] [PATCH 07/56] check-qjson: Cover escaped characters more thoroughly, part 1, Markus Armbruster, 2018/08/08
- [Qemu-devel] [PATCH 08/56] check-qjson: Streamline escaped_string()'s test strings,
Markus Armbruster <=
- [Qemu-devel] [PATCH 35/56] json: Don't create JSON_ERROR tokens that won't be used, Markus Armbruster, 2018/08/08
- [Qemu-devel] [PATCH 17/56] json: Reject unescaped control characters, Markus Armbruster, 2018/08/08
- [Qemu-devel] [PATCH 23/56] json: Leave rejecting invalid UTF-8 to parser, Markus Armbruster, 2018/08/08
- [Qemu-devel] [PATCH 18/56] json: Revamp lexer documentation, Markus Armbruster, 2018/08/08