File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -95,3 +95,26 @@ def test_prompt_no_color(self):
9595 self .child .send ("foo" )
9696 # Check that there are no escape codes.
9797 self .child .expect (re .escape ("\n (lldb) foo" ))
98+
99+ @skipIfAsan
100+ @skipIfEditlineSupportMissing
101+ def test_enable_and_disable_color (self ):
102+ """Test that when we change the color during debugging it applies the changes"""
103+ # launch with colors enabled.
104+ self .launch (use_colors = True )
105+ self .child .send ('settings set prompt-ansi-prefix "${ansi.fg.red}"\n ' )
106+ self .child .expect (re .escape ("\x1b [31m(lldb) \x1b [0m\x1b [8G" ))
107+
108+ # set use color to false.
109+ self .child .send ("settings set use-color false\n " )
110+
111+ # check that there is no color.
112+ self .child .send ("foo\n " )
113+ self .child .expect (re .escape ("(lldb) foo" ))
114+
115+ # set use-color to true
116+ self .child .send ("settings set use-color true\n " )
117+
118+ # check that there is colors;
119+ self .child .send ("foo" )
120+ self .child .expect (re .escape ("\x1b [31m(lldb) \x1b [0m\x1b [8Gfoo" ))
You can’t perform that action at this time.
0 commit comments