This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/testsuite/dwarf2] testcase for duplicated psymtab
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 7 Mar 2005 14:42:51 -0500
- Subject: Re: [RFA/testsuite/dwarf2] testcase for duplicated psymtab
- References: <20050203145813.GL1147@adacore.com>
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