aboutsummaryrefslogtreecommitdiff
path: root/check-qjson.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-08-26 19:52:11 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2011-09-06 10:15:39 -0300
commit69faeee12aee8f54870dbea78d9d1e98e30bd773 (patch)
tree22deb0f27ff9eb1fe927a28408ffb66ac9d5ece6 /check-qjson.c
parent70371cfbf1b5bac6471928f5e30356cb6f7d1187 (diff)
downloadqemu-69faeee12aee8f54870dbea78d9d1e98e30bd773.zip
qemu-69faeee12aee8f54870dbea78d9d1e98e30bd773.tar.gz
qemu-69faeee12aee8f54870dbea78d9d1e98e30bd773.tar.bz2
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>
Diffstat (limited to 'check-qjson.c')
-rw-r--r--check-qjson.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/check-qjson.c b/check-qjson.c
index 64fcdcb..36d4ac2 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\\\"\"",