Author: teemperor Date: Wed Aug 21 05:57:06 2019 New Revision: 369521 URL: http://llvm.org/viewvc/llvm-project?rev=369521&view=rev Log: [lldb] Add tests for setting completions and enable 'settings remove' completion
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py lldb/trunk/source/Commands/CommandObjectSettings.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py?rev=369521&r1=369520&r2=369521&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py Wed Aug 21 05:57:06 2019 @@ -216,6 +216,24 @@ class CommandLineCompletionTestCase(Test 'settings replace target.run-args') @skipIfFreeBSD # timing out on the FreeBSD buildbot + def test_settings_show_term(self): + self.complete_from_to( + 'settings show term-', + 'settings show term-width') + + @skipIfFreeBSD # timing out on the FreeBSD buildbot + def test_settings_list_term(self): + self.complete_from_to( + 'settings list term-', + 'settings list term-width') + + @skipIfFreeBSD # timing out on the FreeBSD buildbot + def test_settings_remove_term(self): + self.complete_from_to( + 'settings remove term-', + 'settings remove term-width') + + @skipIfFreeBSD # timing out on the FreeBSD buildbot def test_settings_s(self): """Test that 'settings s' completes to ['set', 'show'].""" self.complete_from_to( Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=369521&r1=369520&r2=369521&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Wed Aug 21 05:57:06 2019 @@ -613,6 +613,8 @@ public: ~CommandObjectSettingsRemove() override = default; + bool WantsCompletion() override { return true; } + int HandleArgumentCompletion( CompletionRequest &request, OptionElementVector &opt_element_vector) override { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits