From 79d8105fc80b866358c7175aab9bcd4a3e7ac974 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 21 Dec 2018 01:45:28 +0000 Subject: "help finish" tells you it is an alias. "help fin" doesn't. They both run the same command, and people get used to typing the shortest string they can, so we should support alias info on shortened strings as well. llvm-svn: 349874 --- lldb/packages/Python/lldbsuite/test/help/TestHelp.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/help/TestHelp.py') diff --git a/lldb/packages/Python/lldbsuite/test/help/TestHelp.py b/lldb/packages/Python/lldbsuite/test/help/TestHelp.py index 2b89b49a622..7d66b08b86a 100644 --- a/lldb/packages/Python/lldbsuite/test/help/TestHelp.py +++ b/lldb/packages/Python/lldbsuite/test/help/TestHelp.py @@ -231,6 +231,17 @@ class HelpCommandTestCase(TestBase): self.expect("help averyfriendlyalias", matching=True, substrs=['I am a very friendly alias']) @no_debug_info_test + def test_alias_prints_origin(self): + """Test that 'help ' prints the alias origin.""" + def cleanup(): + self.runCmd('command unalias alongaliasname', check=False) + + self.addTearDownHook(cleanup) + self.runCmd('command alias alongaliasname help') + self.expect("help alongaliasna", matching=True, + substrs=["'alongaliasna' is an abbreviation for 'help'"]) + + @no_debug_info_test def test_help_format_output(self): """Test that help output reaches TerminalWidth.""" self.runCmd( -- cgit v1.2.3