mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Dont depend on the default bash prompt when testing
This commit is contained in:
parent
2dd7c3b939
commit
4279f20daf
@ -309,11 +309,12 @@ PS1="{ps1}"
|
||||
with open(os.path.join(home_dir, x), 'w') as f:
|
||||
print(f'echo {x}', file=f)
|
||||
ans['KITTY_BASH_ETC_LOCATION'] = home_dir
|
||||
ans['PS1'] = 'PROMPT $ '
|
||||
return ans
|
||||
|
||||
def run_test(argv, *expected, excluded=()):
|
||||
with self.subTest(argv=argv), self.run_shell(shell='bash', setup_env=partial(setup_env, set(excluded)), cmd=argv) as pty:
|
||||
pty.wait_till(lambda: '$' in pty.screen_contents())
|
||||
pty.wait_till(lambda: 'PROMPT $' in pty.screen_contents())
|
||||
q = pty.screen_contents()
|
||||
for x in expected:
|
||||
self.assertIn(x, q)
|
||||
|
Loading…
Reference in New Issue
Block a user