From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7865 invoked by alias); 17 Apr 2013 11:02:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7854 invoked by uid 89); 17 Apr 2013 11:02:50 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Apr 2013 11:02:47 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3HB2i1B023738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Apr 2013 07:02:44 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3HB2gFE017240; Wed, 17 Apr 2013 07:02:43 -0400 Message-ID: <516E8152.5060709@redhat.com> Date: Wed, 17 Apr 2013 16:06:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: mbilal CC: tromey@redhat.com, schwab@suse.de, hafiz_abid@mentor.com, gdb-patches@sourceware.org Subject: Re: [patch] patch for review of PR gdb/10462 References: <516D3B30.6080501@codesourcery.com> <516E67FE.5070301@codesourcery.com> In-Reply-To: <516E67FE.5070301@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00527.txt.bz2 On 04/17/2013 10:14 AM, mbilal wrote: > + if (**line != '\0' && c->type == set_cmd && !isspace (**line)) > + error (_("Argument must be preceded by space.")); How about putting the 'line' tests together? if (c->type == set_cmd && **line != '\0' && !isspace (**line)) error (_("Argument must be preceded by space.")); As is looks a bit odd to me. > +#test argument must be preceded by space > +foreach x {"history file" "solib-search-path" "data-directory"} { > + foreach y {"/home/" "." "~/home"} { I think it'd be good to test the reported case of using = instead of space too. > + gdb_test "set $x$y" "Argument must be preceded by space." "check space before argument" http://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_messages_are_unique > + gdb_test_no_output "set $x $y" "set $x $y" > + } > +} -- Pedro Alves