================
@@ -0,0 +1,32 @@
+"""
+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 re
+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."""
+        import pexpect
+
+        self.child = pexpect.spawn("expect", encoding="utf-8")
+
+        ansi_red_color_code = "\x1b[31m"
+
+        self.launch(use_colors=True, dimensions=(100, 100))
+        self.child.sendline(
----------------
labath wrote:

Any reason you can't use self.expect instead?

Even if you don't pass it any expectations to it, that function will at least 
check for the lldb prompt, which means it will wait for lldb to process the 
previous command before you feed it the next one. That makes the test much more 
deterministic and reliable.

https://github.com/llvm/llvm-project/pull/91404
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to