This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] patch for review of PR gdb/10462
- From: Pedro Alves <palves at redhat dot com>
- To: mbilal <mbilal at codesourcery dot com>
- Cc: tromey at redhat dot com, schwab at suse dot de, hafiz_abid at mentor dot com, gdb-patches at sourceware dot org
- Date: Wed, 17 Apr 2013 12:02:42 +0100
- Subject: Re: [patch] patch for review of PR gdb/10462
- References: <516D3B30 dot 6080501 at codesourcery dot com> <516E67FE dot 5070301 at codesourcery dot com>
On 04/17/2013 10:14 AM, mbilal wrote:
> + if (**line != '\0' && c->type == set_cmd && !isspace (**line))
> + error (_("Argument must be preceded by space."));
How about putting the 'line' tests together?
if (c->type == set_cmd && **line != '\0' && !isspace (**line))
error (_("Argument must be preceded by space."));
As is looks a bit odd to me.
> +#test argument must be preceded by space
> +foreach x {"history file" "solib-search-path" "data-directory"} {
> + foreach y {"/home/" "." "~/home"} {
I think it'd be good to test the reported case of using = instead of space too.
> + gdb_test "set $x$y" "Argument must be preceded by space." "check space before argument"
http://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_messages_are_unique
> + gdb_test_no_output "set $x $y" "set $x $y"
> + }
> +}
--
Pedro Alves