[lldb/test] Fix failures caused by a previous PExpect.launch change
This should fix the issues introduced by d71d1a9
, which skipped all the
test setup commands.
This also fixes the test failures happening in TestAutosuggestion.py.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
parent
fbf0c42294
commit
1351a9b19e
|
@ -36,8 +36,9 @@ class PExpectTest(TestBase):
|
|||
if not use_colors:
|
||||
args += '--no-use-colors'
|
||||
for cmd in self.setUpCommands():
|
||||
if use_colors and "use-color false" not in cmd:
|
||||
args += ['-O', cmd]
|
||||
if "use-color false" in cmd and use_colors:
|
||||
continue
|
||||
args += ['-O', cmd]
|
||||
if executable is not None:
|
||||
args += ['--file', executable]
|
||||
if extra_args is not None:
|
||||
|
@ -58,9 +59,10 @@ class PExpectTest(TestBase):
|
|||
post_spawn()
|
||||
self.expect_prompt()
|
||||
for cmd in self.setUpCommands():
|
||||
if use_colors and "use-color false" not in cmd:
|
||||
self.child.expect_exact(cmd)
|
||||
self.expect_prompt()
|
||||
if "use-color false" in cmd and use_colors:
|
||||
continue
|
||||
self.child.expect_exact(cmd)
|
||||
self.expect_prompt()
|
||||
if executable is not None:
|
||||
self.child.expect_exact("target create")
|
||||
self.child.expect_exact("Current executable set to")
|
||||
|
|
|
@ -26,7 +26,8 @@ class TestCase(PExpectTest):
|
|||
@skipIfAsan
|
||||
@skipIfEditlineSupportMissing
|
||||
def test_autosuggestion_add_spaces(self):
|
||||
self.launch(extra_args=["-o", "settings set show-autosuggestion true", "-o", "settings set use-color true"])
|
||||
self.launch(use_colors=True,
|
||||
extra_args=["-o", "settings set show-autosuggestion true", "-o", "settings set use-color true"])
|
||||
|
||||
|
||||
# Check if spaces are added to hide the previous gray characters.
|
||||
|
@ -40,7 +41,8 @@ class TestCase(PExpectTest):
|
|||
@skipIfAsan
|
||||
@skipIfEditlineSupportMissing
|
||||
def test_autosuggestion(self):
|
||||
self.launch(extra_args=["-o", "settings set show-autosuggestion true", "-o", "settings set use-color true"])
|
||||
self.launch(use_colors=True,
|
||||
extra_args=["-o", "settings set show-autosuggestion true", "-o", "settings set use-color true"])
|
||||
|
||||
# Common input codes.
|
||||
ctrl_f = "\x06"
|
||||
|
@ -107,7 +109,8 @@ class TestCase(PExpectTest):
|
|||
@skipIfAsan
|
||||
@skipIfEditlineSupportMissing
|
||||
def test_autosuggestion_custom_ansi_prefix_suffix(self):
|
||||
self.launch(extra_args=["-o", "settings set show-autosuggestion true",
|
||||
self.launch(use_colors=True,
|
||||
extra_args=["-o", "settings set show-autosuggestion true",
|
||||
"-o", "settings set use-color true",
|
||||
"-o", "settings set show-autosuggestion-ansi-prefix ${ansi.fg.red}",
|
||||
"-o", "setting set show-autosuggestion-ansi-suffix ${ansi.fg.cyan}"])
|
||||
|
|
Loading…
Reference in a new issue