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: [RFA/testsuite/dwarf2] testcase for duplicated psymtab


On Thu, Feb 03, 2005 at 06:58:14PM +0400, Joel Brobecker wrote:
> OK to apply?

Sorry, missed this.  The gdb.dwarf2 test is OK, except your expect fu
is a little off:

> set test "info sources should contain only one reference to file1.txt"
> gdb_test_multiple "info sources" "$test" {
>   -re "file1\\.txt.*file1\\.txt.*" {
>       fail "$test (file1.txt seen more than once)"
>   }
>   -re "file1\\.txt.*" {
>       pass "$test"
>   }
>   default {
>       fail "$test (file1.txt missing from list of sources)"
>   }
> }

You should never end a regular expression with .*; it means that the
next match can get out of sync with the command stream.  Anchor them
with $gdb_prompt $.

And you don't need a "default" with gdb_test_multiple, either.

OK with those changes.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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