From patchwork Fri Sep 16 16:30:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 115014 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 718F5B71C5 for ; Sat, 17 Sep 2011 03:30:20 +1000 (EST) Received: from localhost ([::1]:39123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4cEz-0007Lr-N4 for incoming@patchwork.ozlabs.org; Fri, 16 Sep 2011 13:30:17 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4cEM-0005hk-KA for qemu-devel@nongnu.org; Fri, 16 Sep 2011 13:29:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4cEK-0005My-DL for qemu-devel@nongnu.org; Fri, 16 Sep 2011 13:29:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4cEJ-0005Mo-VZ for qemu-devel@nongnu.org; Fri, 16 Sep 2011 13:29:36 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8GHTX63015243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Sep 2011 13:29:35 -0400 Received: from localhost (ovpn-113-78.phx2.redhat.com [10.3.113.78]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p8GGUcvM020074; Fri, 16 Sep 2011 12:30:38 -0400 From: Luiz Capitulino To: jforbes@redhat.com Date: Fri, 16 Sep 2011 13:30:17 -0300 Message-Id: <1316190619-4611-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1316190619-4611-1-git-send-email-lcapitulino@redhat.com> References: <1316190619-4611-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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] [STABLE 2/4] 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 (cherry picked from commit 69faeee12aee8f54870dbea78d9d1e98e30bd773) --- 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\\\"\"",