aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-23 18:39:36 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-24 20:26:37 +0200
commitf3cfdd3a30a4bd0158d255daeabde027b76da83f (patch)
tree1ef6e2f6fbf4401be496e0044e2ca1a45c7a1fb6 /tests
parent4e1df9b73480420dbd5b2d22a42038079bb6e265 (diff)
check-qjson: Streamline escaped_string()'s test strings
Merge a few closely related test strings, and drop a few redundant ones. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180823164025.12553-10-armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/check-qjson.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 008b6e95e4..880453a93b 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -56,18 +56,8 @@ static void escaped_string(void)
const char *utf8_out;
int skip;
} test_cases[] = {
- { "\\b", "\b" },
- { "\\f", "\f" },
- { "\\n", "\n" },
- { "\\r", "\r" },
- { "\\t", "\t" },
- { "/", "/" },
+ { "\\b\\f\\n\\r\\t\\\\\\\"", "\b\f\n\r\t\\\"" },
{ "\\/", "/", .skip = 1 },
- { "\\\\", "\\" },
- { "\\\"", "\"" },
- { "hello world \\\"embedded string\\\"",
- "hello world \"embedded string\"" },
- { "hello world\\nwith new line", "hello world\nwith new line" },
{ "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" },