Re: [PATCH 1/3] Test of breakpoint output for dprintf

Tom Tromey
2013-01-09T20:35:49Z

>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:

Yao> We don't have a test to check the output of 'info breakpoints' and fields
Yao> in "=breakpoint-created" notificiation, which are all related to
Yao> 'print_one_breakpoint_location'. This patch adds tests for dprintf.
Yao> Is it OK?

Yao> +gdb_test "info breakpoints" "3\[\t \]+dprintf .*
Yao> +\[\t \]+printf \"At foo entry\\\\n\".
Yao> +\[\t \]+continue.
Yao> +4\[\t \]+dprintf .*
Yao> +\[\t \]+printf \"arg=%d, g=%d\\\\n\", arg, g.
Yao> +\[\t \]+continue." "dprintf info 1"

I find this style of test pretty hard to read.
How about using "\n" instead of a newline?
Or writing the string some other way to make it more readable?

Or perhaps this is just a personal idiosyncracy of mine.
I don't know. If others are ok with this, I don't mind.

Otherwise the patch looks fine.

Tom