From patchwork Tue Sep 6 16:44:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 113635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 85AC6B6F77 for ; Wed, 7 Sep 2011 03:32:26 +1000 (EST) Received: from localhost ([::1]:58261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0zVV-00027u-Gj for incoming@patchwork.ozlabs.org; Tue, 06 Sep 2011 13:32:21 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0zVJ-0001m7-9L for qemu-devel@nongnu.org; Tue, 06 Sep 2011 13:32:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0zVD-0002q5-FG for qemu-devel@nongnu.org; Tue, 06 Sep 2011 13:32:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0zVD-0002q0-7Z for qemu-devel@nongnu.org; Tue, 06 Sep 2011 13:32:03 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p86HVqsG027870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 6 Sep 2011 13:32:02 -0400 Received: from localhost (ovpn-113-32.phx2.redhat.com [10.3.113.32]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p86Gii2U009804; Tue, 6 Sep 2011 12:44:44 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Tue, 6 Sep 2011 13:44:34 -0300 Message-Id: <1315327474-2202-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1315327474-2202-1-git-send-email-lcapitulino@redhat.com> References: <1315327474-2202-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Jan Kiszka , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 2/2] Fix qjson test of solidus encoding X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka "\/" 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 Acked-by: Michael Roth Signed-off-by: Luiz Capitulino --- check-qjson.c | 3 ++- 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\\\"\"",