From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27674 invoked by alias); 10 Apr 2003 13:38:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27665 invoked from network); 10 Apr 2003 13:38:55 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 10 Apr 2003 13:38:55 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h3ADcte30997 for ; Thu, 10 Apr 2003 09:38:55 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3ADctJ22175 for ; Thu, 10 Apr 2003 09:38:55 -0400 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3ADcrm02490; Thu, 10 Apr 2003 09:38:53 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id CB05F2C441; Thu, 10 Apr 2003 09:43:14 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16021.29936.72905.596156@localhost.redhat.com> Date: Thu, 10 Apr 2003 13:38:00 -0000 To: Daniel Jacobowitz Cc: Elena Zannoni , David Carlton , gdb-patches@sources.redhat.com Subject: Re: [RFC/TESTSUITE] completion.exp In-Reply-To: <20030409205704.GA28181@nevyn.them.org> References: <16019.23357.144916.774165@localhost.redhat.com> <16020.32786.577583.70826@localhost.redhat.com> <20030409205704.GA28181@nevyn.them.org> X-SW-Source: 2003-04/txt/msg00195.txt.bz2 Daniel Jacobowitz writes: > On Wed, Apr 09, 2003 at 04:18:26PM -0400, Elena Zannoni wrote: > > David Carlton writes: > > > On Tue, 8 Apr 2003 19:29:01 -0400, Elena Zannoni said: > > > > > > > +# If the directory name contains a '+' we must escape it, adding a backslash. > > > > +# If not, the test below will fail because it will interpret the '+' as a > > > > +# regext operator. > > > > +regsub -all \\+ ${fullsrcdir} \\\+ dirstring > > > > > > Would it be better to use string_to_regexp instead of regsub? (But > > > leaving in the comment as an indication of why you're using it.) > > > > > > > Ah, I didn't know about string_to_regexp. Yes, definitely, thank you. > > How's this? > > Looks right to me too. I believe that in the current status quo you can > approve your own patches to the testsuite. > committed. > > Index: completion.exp > > =================================================================== > > RCS file: /cvs/uberbaum/gdb/testsuite/gdb.base/completion.exp,v > > retrieving revision 1.14 > > diff -u -p -r1.14 completion.exp > > --- completion.exp 4 Jan 2003 22:37:49 -0000 1.14 > > +++ completion.exp 9 Apr 2003 20:11:44 -0000 > > @@ -669,7 +669,14 @@ cd ${srcdir} > > set fullsrcdir [pwd] > > cd ${mydir} > > > > -gdb_test "cd ${fullsrcdir}" "Working directory ${fullsrcdir}.*" "cd to \${srcdir}" > > +# If the directory name contains a '+' we must escape it, adding a backslash. > > +# If not, the test below will fail because it will interpret the '+' as a > > +# regexp operator. We use string_to_regexp for this purpose. > > + > > +gdb_test "cd ${fullsrcdir}" \ > > + "Working directory [string_to_regexp ${fullsrcdir}].*" \ > > + "cd to \${srcdir}" > > + > > send_gdb "file ./gdb.base/compl\t" > > sleep 1 > > gdb_expect { > > > > > > > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer