diff options
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py | 4 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectType.cpp | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py index 8381b123743..4ab22d04e45 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py @@ -24,3 +24,7 @@ class TypeSummaryListArgumentTestCase(TestBase): """Test that the 'type summary list' command handles command line arguments properly""" self.expect('type summary list Foo', substrs=['Category: default', 'Category: system']) self.expect('type summary list char', substrs=['char *', 'unsigned char']) + + self.expect('type summary list -w default', substrs=['system'], matching=False) + self.expect('type summary list -w system unsigned', substrs=['default', '0-9'], matching=False) + self.expect('type summary list -w system char', substrs=['unsigned char *'], matching=True) diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp index 4318c142f33..bed696c9236 100644 --- a/lldb/source/Commands/CommandObjectType.cpp +++ b/lldb/source/Commands/CommandObjectType.cpp @@ -1282,9 +1282,12 @@ class CommandObjectTypeFormatterList : public CommandObjectParsed { case 'w': m_category_regex.SetCurrentValue(option_arg); + m_category_regex.SetOptionWasSet(); break; case 'l': error = m_category_language.SetValueFromString(option_arg); + if (error.Success()) + m_category_language.SetOptionWasSet(); break; default: error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option); |