diff options
author | Enrico Granata <egranata@apple.com> | 2016-02-29 23:22:53 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-02-29 23:22:53 +0000 |
commit | 46d4aa211ff9e84d8f71aafe818804758133b8aa (patch) | |
tree | e0b3359f9b1e2d1ea78ec80b81e23675eb4e245f /lldb/packages/Python/lldbsuite/test/help/TestHelp.py | |
parent | efc091f457c98ecf86498fe0fd45c81a58d4a2ab (diff) | |
download | bcm5719-llvm-46d4aa211ff9e84d8f71aafe818804758133b8aa.tar.gz bcm5719-llvm-46d4aa211ff9e84d8f71aafe818804758133b8aa.zip |
When 'help' cannot find a command, produce additional help text that also points the user to the apropos and type lookup commands
This is useful in cases such as, e.g.
(lldb) help NSString
(the user meant type lookup)
or
(lldb) help kill
(the user is looking for process kill)
Fixes rdar://24868537
llvm-svn: 262271
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/help/TestHelp.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/help/TestHelp.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/help/TestHelp.py b/lldb/packages/Python/lldbsuite/test/help/TestHelp.py index b36d82830a3..4bfbe6ef188 100644 --- a/lldb/packages/Python/lldbsuite/test/help/TestHelp.py +++ b/lldb/packages/Python/lldbsuite/test/help/TestHelp.py @@ -165,3 +165,18 @@ class HelpCommandTestCase(TestBase): substrs = ['The following subcommands are supported:'], patterns = ['expression +--', 'variable +--']) + + @no_debug_info_test + def test_help_provides_alternatives(self): + """Test that help on commands that don't exist provides information on additional help avenues""" + self.expect("help thisisnotadebuggercommand", + substrs = ["'thisisnotadebuggercommand' is not a known command.", + "Try 'help' to see a current list of commands.", + "Try 'apropos thisisnotadebuggercommand' for a list of related commands.", + "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."], error=True) + + self.expect("help process thisisnotadebuggercommand", + substrs = ["'process thisisnotadebuggercommand' is not a known command.", + "Try 'help' to see a current list of commands.", + "Try 'apropos thisisnotadebuggercommand' for a list of related commands.", + "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."]) |