mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Make the no-integration test more comprehensive and stronger
This commit is contained in:
parent
85c6d8f16e
commit
4552a474b7
@ -196,8 +196,14 @@ copy --exclude */w.* d1
|
||||
# check that turning off shell integration works
|
||||
if ok_login_shell in ('bash', 'zsh'):
|
||||
for val in ('', 'no-rc', 'enabled no-rc'):
|
||||
with tempfile.TemporaryDirectory() as tdir:
|
||||
self.check_bootstrap('sh', tdir, ok_login_shell, val)
|
||||
for sh in self.all_possible_sh:
|
||||
with tempfile.TemporaryDirectory() as tdir:
|
||||
pty = self.check_bootstrap(sh, tdir, ok_login_shell, val)
|
||||
num_lines = len(pty.screen_contents().splitlines())
|
||||
pty.send_cmd_to_child('echo "$TERM=fruity"')
|
||||
pty.wait_till(lambda: 'kitty=fruity' in pty.screen_contents())
|
||||
pty.wait_till(lambda: len(pty.screen_contents().splitlines()) >= num_lines + 2)
|
||||
self.assertEqual(pty.screen.cursor.shape, 0)
|
||||
|
||||
def check_bootstrap(self, sh, home_dir, login_shell='', SHELL_INTEGRATION_VALUE='enabled', extra_exec='', pre_data='', ssh_opts=None):
|
||||
ssh_opts = ssh_opts or {}
|
||||
|
Loading…
Reference in New Issue
Block a user