26 lines · python
1"""2Test that disabling breakpoints and viewing them in a list uses the correct ANSI color settings when colors are enabled and disabled.3"""4 5import lldb6from lldbsuite.test.decorators import *7from lldbsuite.test.lldbtest import *8from lldbsuite.test import lldbutil9from lldbsuite.test.lldbpexpect import PExpectTest10 11import io12 13 14class DisabledBreakpointsTest(PExpectTest):15 @add_test_categories(["pexpect"])16 def test_disabling_breakpoints_with_color(self):17 """Test that disabling a breakpoint and viewing the breakpoints list uses the specified ANSI color prefix."""18 ansi_red_color_code = "\x1b[31m"19 20 self.launch(use_colors=True, dimensions=(100, 100))21 self.expect('settings set disable-ansi-prefix "${ansi.fg.red}"')22 self.expect("b main")23 self.expect("br dis")24 self.expect("br l", substrs=[ansi_red_color_code + "1:"])25 self.quit()26