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

Stan Shebs
2013-05-16T00:27:27Z

On 5/15/13 4:47 PM, Keith Seitz wrote:
> On 05/15/2013 03:33 PM, Sergio Durigan Junior wrote:
>> 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
>
> Is that necessarily "better" than testing what a user would actually
> type? I don't know. gdb.base/completion.exp uses both forms.
>
>> Also, ISTR "send_gdb" is deprecated, and one should use
>> "gdb_test_multiple" instead. WDYT?
>
> Is send_gdb deprecated or gdb_expect? Or is their direct use discouraged?
>
> This is the first I've heard of send_gdb being deprecated. As far as I
> can tell, there is no other way to directly test completion this way. I
> do see, though, that completion.exp uses gdb_test_multiple instead of
> gdb_expect... If it truly is deprecated, I would expect send_gdb to be
> made "private" in some way. [deprecated_send_gdb?] Or at least mentioned
> in lib/gdb.exp.

I think send_gdb and gdb_expect are still key building blocks, but most
of their uses have been for multi-outcome tests that can be done as well
or better with gdb_test_multiple.

It may even be that gdb_test_multiple suffices for all of the existing
send_gdb/gdb_expect pairs, but I don't imagine anyone has the fortitude
to work through every one of them. :-)

Stan
stan@codesourcery.com