summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-08-26 19:52:11 +0200
committerJustin M. Forbes <jforbes@redhat.com>2011-10-03 14:38:17 -0500
commitb89f4a7d2a9d4261288ae4d75ae103177c172c3f (patch)
treee440ac26e1bc1b6f1c690b61488df2f8008342a4
parentfbdd7c8bd53aa8228b6faca00d29ce60a42ae8b2 (diff)
downloadqemu-b89f4a7d2a9d4261288ae4d75ae103177c172c3f.tar.gz
Fix qjson test of solidus encoding
"\/" is supposed to be decoded as "/", but there is no need to encode "/" via escape. Fix the existing test and add a second one expressing this. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r--check-qjson.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/check-qjson.c b/check-qjson.c
index 64fcdcb4ad..36d4ac26b4 100644
--- a/check-qjson.c
+++ b/check-qjson.c
@@ -33,7 +33,8 @@ START_TEST(escaped_string)
{ "\"\\n\"", "\n" },
{ "\"\\r\"", "\r" },
{ "\"\\t\"", "\t" },
- { "\"\\/\"", "\\/" },
+ { "\"/\"", "/" },
+ { "\"\\/\"", "/", .skip = 1 },
{ "\"\\\\\"", "\\" },
{ "\"\\\"\"", "\"" },
{ "\"hello world \\\"embedded string\\\"\"",