diff options
Diffstat (limited to 'lldb/test/API/terminal/TestDisabledBreakpoints.py')
| -rw-r--r-- | lldb/test/API/terminal/TestDisabledBreakpoints.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lldb/test/API/terminal/TestDisabledBreakpoints.py b/lldb/test/API/terminal/TestDisabledBreakpoints.py new file mode 100644 index 000000000000..a644c94c8a17 --- /dev/null +++ b/lldb/test/API/terminal/TestDisabledBreakpoints.py @@ -0,0 +1,25 @@ +""" +Test that disabling breakpoints and viewing them in a list uses the correct ANSI color settings when colors are enabled and disabled. +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test.lldbpexpect import PExpectTest + +import io + + +class DisabledBreakpointsTest(PExpectTest): + @add_test_categories(["pexpect"]) + def test_disabling_breakpoints_with_color(self): + """Test that disabling a breakpoint and viewing the breakpoints list uses the specified ANSI color prefix.""" + ansi_red_color_code = "\x1b[31m" + + self.launch(use_colors=True, dimensions=(100, 100)) + self.expect('settings set disable-ansi-prefix "${ansi.fg.red}"') + self.expect("b main") + self.expect("br dis") + self.expect("br l", substrs=[ansi_red_color_code + "1:"]) + self.quit() |
