This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch] patch for review of PR gdb/10462


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


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