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]

[RFA] completion.exp fix


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'"}

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