This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/TESTSUITE] completion.exp


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 <ezannoni at redhat dot com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]