Re: [RFA] completer test [was Re: [RFC] Cleanup for make_source_files_completion_list]

Sergio Durigan Junior
2013-05-15T22:33:48Z

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