summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2018-07-26 17:14:18 +0000
committerRaphael Isemann <teemperor@gmail.com>2018-07-26 17:14:18 +0000
commit223d921c6a17c037ba2d5276bc70e916df63827f (patch)
treec7b6e5acf4e5a6e308f2e9235634340c14fc332a /lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
parent279621fbf0ab3758784bf79139711ae3424f69ec (diff)
downloadbcm5719-llvm-223d921c6a17c037ba2d5276bc70e916df63827f.tar.gz
bcm5719-llvm-223d921c6a17c037ba2d5276bc70e916df63827f.zip
Fix duplicate suggestions after an ambiguous command
Summary: So far lldb is printing this when it finds an ambiguous command: ``` (lldb) g Ambiguous command 'g'. Possible matches: gdb-remote gui gdb-remote gui ``` The duplicates come from the fact that we call the same query twice with the same parameters and add it to the same list. This patch just removes the second query call to `GetCommandObject`. As `GetCommandObject` is const and the name parameter is also not modified, this shouldn't break anything else. I didn't merge the remaining if statement into the else as I think otherwise the `if obj==nullptr do X else Y` pattern in there becomes hard to recognize. Reviewers: davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49866 llvm-svn: 338043
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py b/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
index dcfb434f1e5..c25f9afbfa4 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
@@ -26,7 +26,7 @@ class UnknownCommandTestCase(TestBase):
self.assertRegexpMatches(result.GetError(), "Ambiguous command 'g'. Possible matches:")
self.assertRegexpMatches(result.GetError(), "gui")
self.assertRegexpMatches(result.GetError(), "gdb-remote")
- # FIXME: Somehow we get 'gui' and 'gdb-remote' twice in the output.
+ self.assertEquals(1, result.GetError().count("gdb-remote"))
@no_debug_info_test
def test_unknown_command(self):
OpenPOWER on IntegriCloud