This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] completer test [was Re: [RFC] Cleanup for make_source_files_completion_list]
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Wed, 15 May 2013 19:33:42 -0300
- Subject: Re: [RFA] completer test [was Re: [RFC] Cleanup for make_source_files_completion_list]
- References: <51895A2F dot 8000504 at redhat dot com> <CADPb22Sj_5Bp+FhoQYk_9vR5c1D3fXsw4gLFu7v+jmDNSaOPFg at mail dot gmail dot com> <5191340B dot 60100 at redhat dot com> <519156F5 dot 5090000 at redhat dot com> <5193C786 dot 4000207 at redhat dot com> <5193E2DC dot 5000200 at redhat dot com>
Hi Keith,
I know you have already committed the patch, but I just would like to
ask a few things.
On Wednesday, May 15 2013, Keith Seitz wrote:
> diff --git a/gdb/testsuite/gdb.base/filesym.exp b/gdb/testsuite/gdb.base/filesym.exp
> new file mode 100644
> index 0000000..c9e9c20
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/filesym.exp
> +# Test completion list for "filesy". We expect the immediate result to
> +# complete to "filesym"; completing again, we expect the symbol name and the
> +# filename (in that order).
> +
> +send_gdb "break filesy\t"
> +gdb_expect {
> + -re "m\$" {
> + pass "complete on \"filesy\""
> +
> + # Now ask for the completion list
> + send_gdb "\t\t"
> + gdb_expect {
> + -re ".*filesym\[ \t\]+filesym.c.*$gdb_prompt break filesym\$" {
> + pass "completion list for \"filesym\""
> + }
> +
> + default {
> + fail "completion list for \"filesym\""
> + }
> + }
> + }
> +
> + default {
> + fail "complete on \"filesy\""
> + }
> +}
Wouldn't it be better to use the "complete" command? Here is what I see
when I use it:
(gdb) complete break filesy
break filesym
break filesym.c
Also, ISTR "send_gdb" is deprecated, and one should use
"gdb_test_multiple" instead. WDYT?
Thanks,
--
Sergio