diff options
author | Greg Clayton <gclayton@apple.com> | 2015-01-09 19:08:20 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-01-09 19:08:20 +0000 |
commit | b547278cae31a73e78cdc35205a6fb5b953db5bd (patch) | |
tree | 0bfa2c6213b8f76f4b1b144454d83644af067bed /lldb/test/functionalities/command_regex/TestCommandRegex.py | |
parent | 1e923ec1225be4d1c48db75ef8c84866abef75ba (diff) | |
download | bcm5719-llvm-b547278cae31a73e78cdc35205a6fb5b953db5bd.tar.gz bcm5719-llvm-b547278cae31a73e78cdc35205a6fb5b953db5bd.zip |
Fixed an issue where you couldn't delete a user defined regex, python, or multi-word command by adding a new "command delete" command.
This new command will delete user defined regular commands, but not aliases. We still have "command unalias" to remove aliases as they are currently in different buckets. Appropriate error messages are displayed to inform the user when "command unalias" is used on removable user defined commands that points users to the "command delete" command.
Added a test to verify we can remove user defined commands and also verify that "command unalias" fails when used on a user defined command.
<rdar://problem/18248300>
llvm-svn: 225535
Diffstat (limited to 'lldb/test/functionalities/command_regex/TestCommandRegex.py')
-rw-r--r-- | lldb/test/functionalities/command_regex/TestCommandRegex.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/test/functionalities/command_regex/TestCommandRegex.py b/lldb/test/functionalities/command_regex/TestCommandRegex.py index eabbd192424..9571bb2eb56 100644 --- a/lldb/test/functionalities/command_regex/TestCommandRegex.py +++ b/lldb/test/functionalities/command_regex/TestCommandRegex.py @@ -37,6 +37,19 @@ class CommandRegexTestCase(TestBase): child.sendline('Help__') # If we see the familiar 'help' output, the test is done. child.expect('The following is a list of built-in, permanent debugger commands:') + + # Try and incorrectly remove "Help__" using "command unalias" and verify we fail + child.sendline('command unalias Help__') + child.expect_exact("error: 'Help__' is not an alias, it is a debugger command which can be removed using the 'command delete' command") + child.expect_exact(prompt) + + # Delete the regex command using "command delete" + child.sendline('command delete Help__') + child.expect_exact(prompt) + # Verify the command was removed + child.sendline('Help__') + child.expect_exact("error: 'Help__' is not a valid command") + child.expect_exact(prompt) if __name__ == '__main__': import atexit |