forked from OSchip/llvm-project
[lldb] tab completion for `platform target-install`
1. Applied the common completion `eDiskFileCompletion` to the first argument of the command `platform target-install`. 2. Added a related test case. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D84179
This commit is contained in:
parent
6fe6b29c29
commit
e3820570d4
|
@ -1706,6 +1706,16 @@ public:
|
|||
|
||||
~CommandObjectPlatformInstall() override = default;
|
||||
|
||||
void
|
||||
HandleArgumentCompletion(CompletionRequest &request,
|
||||
OptionElementVector &opt_element_vector) override {
|
||||
if (request.GetCursorIndex())
|
||||
return;
|
||||
CommandCompletions::InvokeCommonCompletionCallbacks(
|
||||
GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
|
||||
request, nullptr);
|
||||
}
|
||||
|
||||
bool DoExecute(Args &args, CommandReturnObject &result) override {
|
||||
if (args.GetArgumentCount() != 2) {
|
||||
result.AppendError("platform target-install takes two arguments");
|
||||
|
|
|
@ -426,6 +426,9 @@ class CommandLineCompletionTestCase(TestBase):
|
|||
self.runCmd("frame recognizer add -l py_class -s module_name -n recognizer_name")
|
||||
self.check_completion_with_desc('frame recognizer delete ', [['0', 'py_class, module module_name, symbol recognizer_name']])
|
||||
|
||||
def test_platform_install_local_file(self):
|
||||
self.complete_from_to('platform target-install main.cp', 'platform target-install main.cpp')
|
||||
|
||||
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
|
||||
def test_symbol_name(self):
|
||||
self.build()
|
||||
|
|
Loading…
Reference in New Issue