This is processed by hand in CommandObjectMultiword, and is undiscoverable, it doesn't work in all cases. Because it is a bare word, it can't really be extended w/o introducing the possibility of collisions as well. If we did want to do something like this we should add a --help flag to CommandObject. That way the feature would be consistent and documented. Differential Revision: https://reviews.llvm.org/D142067
22 lines
687 B
Python
22 lines
687 B
Python
"""
|
|
Test multiword commands ('platform' in this case).
|
|
"""
|
|
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
|
|
class MultiwordCommandsTestCase(TestBase):
|
|
|
|
@no_debug_info_test
|
|
def test_ambiguous_subcommand(self):
|
|
self.expect("platform s", error=True,
|
|
substrs=["ambiguous command 'platform s'. Possible completions:",
|
|
"\tselect\n",
|
|
"\tsettings\n",
|
|
"\tshell\n"])
|
|
|
|
@no_debug_info_test
|
|
def test_empty_subcommand(self):
|
|
self.expect("platform \"\"", error=True, substrs=["Need to specify a non-empty subcommand."])
|