This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] completion.exp fix
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] completion.exp fix
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Mon, 02 Jul 2001 15:53:53 -0700
- Organization: Red Hat
In the test for "info func mark<tab><tab>", the regular expression as
written will fail if there are any matching functions in files other
than break.c (such as library files). This adds a wild card before
and after the matching functions that we are interested in.
2001-07-02 Michael Snyder <msnyder@redhat.com>
* gdb.base/completion.exp: Don't assume that break.c is the only
source file that may contain functions named "marker".
Index: completion.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/completion.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 completion.exp
*** completion.exp 2001/05/30 02:54:41 1.4
--- completion.exp 2001/07/02 22:45:24
*************** gdb_expect {
*** 576,582 ****
-re "marker1.*$gdb_prompt info func marker$"\
{ send_gdb "\n"
gdb_expect {
! -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);\r\n$gdb_prompt $"\
{ pass "complete 'info func mar'"}
-re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
timeout {fail "(timeout) complete 'info func mar'"}
--- 576,582 ----
-re "marker1.*$gdb_prompt info func marker$"\
{ send_gdb "\n"
gdb_expect {
! -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
{ pass "complete 'info func mar'"}
-re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
timeout {fail "(timeout) complete 'info func mar'"}