From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6368 invoked by alias); 9 Apr 2003 20:57:13 -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 6339 invoked from network); 9 Apr 2003 20:57:12 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 9 Apr 2003 20:57:12 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 193Md7-0001f1-00; Wed, 09 Apr 2003 15:57:13 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 193Mcy-0007M2-00; Wed, 09 Apr 2003 16:57:04 -0400 Date: Wed, 09 Apr 2003 20:57:00 -0000 From: Daniel Jacobowitz To: Elena Zannoni Cc: David Carlton , gdb-patches@sources.redhat.com Subject: Re: [RFC/TESTSUITE] completion.exp Message-ID: <20030409205704.GA28181@nevyn.them.org> Mail-Followup-To: Elena Zannoni , David Carlton , gdb-patches@sources.redhat.com References: <16019.23357.144916.774165@localhost.redhat.com> <16020.32786.577583.70826@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16020.32786.577583.70826@localhost.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-04/txt/msg00178.txt.bz2 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. > elena > > > > 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