aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py3
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py b/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
index 12d5725..80b144f 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
@@ -20,8 +20,7 @@ class MultiwordCommandsTestCase(TestBase):
@no_debug_info_test
def test_empty_subcommand(self):
- # FIXME: This has no error message.
- self.expect("platform \"\"", error=True)
+ self.expect("platform \"\"", error=True, substrs=["Need to specify a non-empty subcommand."])
@no_debug_info_test
def test_help(self):
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index c0f5d67..03a3770 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -94,8 +94,10 @@ bool CommandObjectMultiword::Execute(const char *args_string,
}
auto sub_command = args[0].ref();
- if (sub_command.empty())
+ if (sub_command.empty()) {
+ result.AppendError("Need to specify a non-empty subcommand.");
return result.Succeeded();
+ }
if (sub_command.equals_lower("help")) {
this->CommandObject::GenerateHelpText(result);