================ @@ -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') + self.child.send('settings set prompt "${ansi.fg.red}(lldb)${ansi.normal} "\n') + self.child.send("foo") + # Make sure this change is reflected immediately. Check that the color + # is set (31) and the cursor position (8) is correct. + # Prompt: (lldb) _ + # Column: 1....6.8 + self.child.expect(re.escape("\x1b[31m(lldb)\x1b[0m foo")) ---------------- labath wrote:
The precommit failure appears to be genuine. The required string is present in the output, but for some reason this line starts searching after it. My suggested change may or may not fix it. https://github.com/llvm/llvm-project/pull/123430 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits