|
| From: | Eric Blake |
| Subject: | Re: [Qemu-devel] [PATCH 08/56] check-qjson: Streamline escaped_string()'s test strings |
| Date: | Thu, 9 Aug 2018 08:57:38 -0500 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 08/08/2018 07:02 AM, Markus Armbruster wrote:
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(-)
} 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 },
Aha - this adds coverage of the escaped ' not present in 7/56. (Still nothing about the unescaped versions of ' or " with correct quoting).
Reviewed-by: Eric Blake <address@hidden> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
| [Prev in Thread] | Current Thread | [Next in Thread] |