Patchwork [2/2] Fix qjson test of solidus encoding

login
register
mail settings
Submitter Luiz Capitulino
Date Sept. 6, 2011, 4:44 p.m.
Message ID <1315327474-2202-3-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/113635/
State New
Headers show

Comments

Luiz Capitulino - Sept. 6, 2011, 4:44 p.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

"\/" 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>
---
 check-qjson.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

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\\\"\"",