Fix an issue where the apropos command would not print fully qualified command names...
authorEnrico Granata <egranata@apple.com>
Mon, 2 May 2016 21:28:40 +0000 (21:28 +0000)
committerEnrico Granata <egranata@apple.com>
Mon, 2 May 2016 21:28:40 +0000 (21:28 +0000)
rdar://problem/26020072

llvm-svn: 268309

lldb/packages/Python/lldbsuite/test/help/TestApropos.py [new file with mode: 0644]
lldb/source/Interpreter/CommandInterpreter.cpp

diff --git a/lldb/packages/Python/lldbsuite/test/help/TestApropos.py b/lldb/packages/Python/lldbsuite/test/help/TestApropos.py
new file mode 100644 (file)
index 0000000..7b2e699
--- /dev/null
@@ -0,0 +1,22 @@
+"""
+Test some lldb apropos commands.
+"""
+
+from __future__ import print_function
+
+
+
+import os, time
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class AproposCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_apropos_variable(self):
+        """Test that 'apropos variable' prints the fully qualified command name"""
+        self.expect('apropos variable', substrs=['frame variable', 'target variable', 'watchpoint set variable'])
index bf6cded..34574d4 100644 (file)
@@ -2802,7 +2802,7 @@ CommandInterpreter::FindCommandsForApropos (const char *search_word,
                                            search_syntax,
                                            search_options))
         {
-            commands_found.AppendString (command_name);
+            commands_found.AppendString (cmd_obj->GetCommandName());
             commands_help.AppendString (cmd_obj->GetHelp());
         }