This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fully anchor mi_gdb_test expected results.
On Thu, Aug 04, 2005 at 10:26:01AM -0400, Bob Rossi wrote:
> > > which simply allows any data at the beggining of the match. So I could
> > > easily modify an MI command to output "HAHAHA, YOU CAN'T TEST ME", as
> > > the first thing it outputs, and it would go unnoticed in the
> > > testsuite. Probably the reason this could not have been done before is
> > > because the MI input command was being echo'd back, and it would be
> > > complicated to match that data.
> >
> > I am suggesting anchoring the pattern with a copy of what you expect to
> > be echoed. We already have code to escape a string into a regex. We
> > know what we sent to GDB.
>
> I originally tried this, but failed because I did *not* know how to
> escape a string into a regex. Is there a function written that does
> this? I'll try it.
Is it string_to_regexp? I'll try this.
Bob Rossi