* gdb.base/del.exp (test_delete_alias): New function.
Now check that both "del" and "d" work as aliases for "delete".
This commit is contained in:
parent
b4e70030cb
commit
6c0112ecf2
@ -1,3 +1,8 @@
|
||||
2006-05-19 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* gdb.base/del.exp (test_delete_alias): New function.
|
||||
Now check that both "del" and "d" work as aliases for "delete".
|
||||
|
||||
2006-05-18 Fred Fish <fnf@specifix.com>
|
||||
|
||||
* gdb.base/a2-run.exp: Allow part of test to run when args aren't
|
||||
|
@ -39,19 +39,40 @@ gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# Test whether the "del" command works as an alias of "delete".
|
||||
# For that, insert a breakpoint at an easy location, remove it,
|
||||
# and then check in the output of "info break" that this breakpoint
|
||||
# no longer exists.
|
||||
# A function to test that ALIAS is working as a shortcut of the "delete"
|
||||
# command.
|
||||
|
||||
gdb_test "break main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
proc test_delete_alias { alias } {
|
||||
global srcfile
|
||||
|
||||
gdb_test "del \$bpnum" \
|
||||
"" \
|
||||
"Remove last breakpoint"
|
||||
# First of all, remove all previous breakpoints if there were any,
|
||||
# and then verify that we do not have any breakpoint lying around.
|
||||
gdb_test "delete" \
|
||||
"" \
|
||||
"Remove all breakpoints ($alias)"
|
||||
gdb_test "info break" \
|
||||
"No breakpoints or watchpoints." \
|
||||
"info break after removing break on main"
|
||||
|
||||
|
||||
# Now, insert a breakpoint at an easy location, and then remove it
|
||||
# using $alias. We verified that the removal worked by checking
|
||||
# the list of breakpoints.
|
||||
gdb_test "break main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint insertion ($alias)"
|
||||
|
||||
gdb_test "$alias \$bpnum" \
|
||||
"" \
|
||||
"Remove last breakpoint ($alias)"
|
||||
|
||||
gdb_test "info break" \
|
||||
"No breakpoints or watchpoints." \
|
||||
"info break after removing break on main ($alias)"
|
||||
}
|
||||
|
||||
# Test various shortcut forms of the "delete" command.
|
||||
|
||||
test_delete_alias "del"
|
||||
test_delete_alias "d"
|
||||
|
||||
gdb_test "info break" \
|
||||
"No breakpoints or watchpoints." \
|
||||
"info break after removing break on main"
|
||||
|
Loading…
x
Reference in New Issue
Block a user