[Lldb-commits] [lldb] [lldb] Support format string in the prompt (PR #123430)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Sun Jan 19 23:47:16 PST 2025


================
@@ -69,6 +69,22 @@ def test_prompt_color(self):
         # Column: 1....6.8
         self.child.expect(re.escape("\x1b[31m(lldb) \x1b[0m\x1b[8G"))
 
+    @skipIfAsan
+    @skipIfEditlineSupportMissing
+    def test_prompt_format_color(self):
+        """Test that we can change the prompt color with a format string."""
+        self.launch(use_colors=True)
+        # Clear the prefix and suffix setting to simplify the output.
+        self.child.send('settings set prompt-ansi-prefix ""\n')
+        self.child.send('settings set prompt-ansi-suffix ""\n')
----------------
labath wrote:

```suggestion
        self.expect('settings set prompt-ansi-prefix ""')
        self.expect('settings set prompt-ansi-suffix ""')
```

This makes sure lldb processes the command before you give it the next one.

https://github.com/llvm/llvm-project/pull/123430


More information about the lldb-commits mailing list