diff options
author | Fernando Nasser <fnasser@redhat.com> | 2000-03-23 23:48:28 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2000-03-23 23:48:28 +0000 |
commit | 003ba2901f8c7c58d5d7b9059ed91b331466c532 (patch) | |
tree | 148a9379a49c1a9d8a75f771541d0f5402beec4e /gdb/testsuite | |
parent | 5638284566b17ba60eedca50f6e7bc13e7a3cc29 (diff) | |
download | gdb-003ba2901f8c7c58d5d7b9059ed91b331466c532.zip gdb-003ba2901f8c7c58d5d7b9059ed91b331466c532.tar.gz gdb-003ba2901f8c7c58d5d7b9059ed91b331466c532.tar.bz2 |
2000-03-23 Fernando Nasser <fnasser@totem.to.cygnus.com>
From David Whedon <dwhedon@gordian.com>
* gdb.base/commands.exp : Added command deprecator tests.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/commands.exp | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ded1f39..e2d7314 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2000-03-23 Fernando Nasser <fnasser@totem.to.cygnus.com> + + From David Whedon <dwhedon@gordian.com> + * gdb.base/commands.exp : Added command deprecator tests. + 2000-03-22 Daniel Berlin <dan@cgsoftware.com> * gdb.base/help.exp: Added test for new apropos command. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 71491db..f15f49d 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -375,6 +375,31 @@ proc test_command_prompt_position {} { } + +proc deprecated_command_test {} { + + + gdb_test "maintenance deprecate blah" "Can't find command.*" \ + "tried to deprecate non-existsing command" + + gdb_test "maintenance deprecate p \"new_p\"" "" + gdb_test "p 5" "Warning: 'p', an alias for the command 'print' is deprecated.*Use 'new_p'.*" "p deprecated warning, with replacement" + gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away" + + gdb_test "maintenance deprecate p \"new_p\"" "" + gdb_test "maintenance deprecate print \"new_print\"" "" + gdb_test "p 5" "Warning: command 'print' \\(p\\) is deprecated.*Use 'new_print'.*" "both alias and command are deprecated" + gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away" + + gdb_test "maintenance deprecate set endian big \"seb\" " "" "deprecate long comamnd" + gdb_test "set endian big" "Warning: command 'set endian big' is deprecated.*Use 'seb'.*" "long command deprecated" + + gdb_test "maintenance deprecate set endian big" "" "deprecate long comamnd" + gdb_test "set endian big" "Warning: command 'set endian big' is deprecated.*No alternative known.*" "long command deprecated with no alternative." + +} + + gdbvar_simple_if_test gdbvar_simple_while_test gdbvar_complex_if_while_test @@ -387,6 +412,9 @@ breakpoint_command_test user_defined_command_test watchpoint_command_test test_command_prompt_position +deprecated_command_test + + |