From 4552a474b75cc916c2e77368d72cd94738059e6f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 6 Mar 2022 12:23:11 +0530 Subject: [PATCH] Make the no-integration test more comprehensive and stronger --- kitty_tests/ssh.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py index dc400a82f..c53f34047 100644 --- a/kitty_tests/ssh.py +++ b/kitty_tests/ssh.py @@ -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 {}