diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-13 10:13:02 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:01:24 -0400 |
commit | d59323343825d14b6fc2d0f14bc5020b634150fe (patch) | |
tree | f33d62106609bb297fe7b4a58a4b08d435c6a2b8 /tests/check-qjson.c | |
parent | 05dfb26cd2bf3f50a0fbf08a68a3bd415301edc5 (diff) | |
download | qemu-d59323343825d14b6fc2d0f14bc5020b634150fe.zip qemu-d59323343825d14b6fc2d0f14bc5020b634150fe.tar.gz qemu-d59323343825d14b6fc2d0f14bc5020b634150fe.tar.bz2 |
json-lexer: fix escaped backslash in single-quoted string
This made the lexer wait for a closing *double* quote.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tests/check-qjson.c')
-rw-r--r-- | tests/check-qjson.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/check-qjson.c b/tests/check-qjson.c index 4e74548..95497a0 100644 --- a/tests/check-qjson.c +++ b/tests/check-qjson.c @@ -45,6 +45,13 @@ static void escaped_string(void) { "\"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" }, + { "'\\b'", "\b", .skip = 1 }, + { "'\\f'", "\f", .skip = 1 }, + { "'\\n'", "\n", .skip = 1 }, + { "'\\r'", "\r", .skip = 1 }, + { "'\\t'", "\t", .skip = 1 }, + { "'\\/'", "/", .skip = 1 }, + { "'\\\\'", "\\", .skip = 1 }, {} }; |