1import lldb 2from lldbsuite.test.decorators import * 3from lldbsuite.test.lldbtest import * 4from lldbsuite.test import lldbutil 5 6class TestCase(TestBase): 7 8 @no_debug_info_test 9 def test_error(self): 10 self.expect("breakpoint set --func-regex (", error=True, 11 substrs=["error: Function name regular expression could " + 12 "not be compiled: parentheses not balanced"]) 13 14 # Point out if looks like the user provided a globbing expression. 15 self.expect("breakpoint set --func-regex *a", error=True, 16 substrs=["error: Function name regular expression could " + 17 "not be compiled: repetition-operator operand invalid", 18 "warning: Function name regex does not accept glob patterns."]) 19 self.expect("breakpoint set --func-regex ?a", error=True, 20 substrs=["error: Function name regular expression could " + 21 "not be compiled: repetition-operator operand invalid", 22 "warning: Function name regex does not accept glob patterns."]) 23 # Make sure that warning is only shown for invalid regular expressions 24 # that look like a globbing expression (i.e., they have a leading * or ?). 25 self.expect("breakpoint set --func-regex a*+", error=True, matching=False, 26 substrs=["warning: Function name regex does not accept glob patterns."]) 27 self.expect("breakpoint set --func-regex a?+", error=True, matching=False, 28 substrs=["warning: Function name regex does not accept glob patterns."]) 29