Further cleanup/modernization of gdb.base/commands.exp
authorPedro Alves <palves@redhat.com>
Wed, 9 Nov 2016 18:48:25 +0000 (18:48 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 9 Nov 2016 18:48:25 +0000 (18:48 +0000)
commitfad0c9fb7dd362bdb5a3e4f89fb7f6e6789f5beb
treef5cfc56c2255e295bcf57f3037414f5ee35c1017
parent7efeed176a291c15c74e80aee5d7f906e28081cf
Further cleanup/modernization of gdb.base/commands.exp

 - Use multi_line for matching multi-line GDB output.

 - Add a multi_line_input variant of multi_line to build GDB input and
   use it throughout.

   (The two changes above make the tests much more readable, IMO.)

 - Add a new valnum_re global to get rid of the multiple "\\\$\[0-9\]*".

 - Remove gdb_stop_suppressing_tests uses.

 - tighten a few regexps.

 - Replace send_gdb/gdb_expect with gdb_test_multiple and simplify,
   making pass/fail messages the same.

gdb/ChangeLog:
2016-11-09  Pedro Alves  <palves@redhat.com>

* gdb.base/commands.exp (runto_or_return): New procedure.
(gdbvar_simple_if_test, gdbvar_simple_while_test)
(gdbvar_complex_if_while_test, progvar_simple_if_test)
(progvar_simple_while_test, progvar_complex_if_while_test)
(if_while_breakpoint_command_test)
(infrun_breakpoint_command_test, breakpoint_command_test)
(user_defined_command_test, watchpoint_command_test)
(test_command_prompt_position, redefine_hook_test)
(stray_arg0_test, error_clears_commands_left, redefine_hook_test)
(redefine_backtrace_test): Use runto_or_return, $valnum_re,
multi_line_input and multi_line.  Remove gdb_expect and
gdb_stop_suppressing_tests uses.
* lib/gdb.exp (valnum_re): New global.
* lib/gdb.exp (valnum_re): New global.
(multi_line_input): New procedure.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/commands.exp
gdb/testsuite/lib/gdb.exp
This page took 0.027827 seconds and 4 git commands to generate.