From 78542ede14ca32edd6fd61ec7648646c68250a0e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Jul 2022 14:20:39 +0530 Subject: [PATCH] Separate test for SIGWINCH handling --- kitty_tests/prewarm.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kitty_tests/prewarm.py b/kitty_tests/prewarm.py index 53249c5ee..d926e4dc2 100644 --- a/kitty_tests/prewarm.py +++ b/kitty_tests/prewarm.py @@ -92,12 +92,18 @@ def socket_child_main(exit_code=0, initial_print=''): # pty = self.create_pty( # argv=[kitty_exe(), '+runpy', src + 'socket_child_main(initial_print="child ready:")'], cols=cols, env=env, cwd=cwd) # pty.wait_till(lambda: 'child ready:' in pty.screen_contents()) - # pty.set_window_size(columns=cols + 3) - # pty.wait_till(lambda: f'Screen size changed: {cols + 3}' in pty.screen_contents()) # pty.write_to_child('\x03', flush=True) # wait_for_death(signal.SIGINT, timeout=30) # pty.wait_till(lambda: 'KeyboardInterrupt' in pty.screen_contents()) + # test SIGWINCH handling + pty = self.create_pty( + argv=[kitty_exe(), '+runpy', src + 'socket_child_main(initial_print="child ready:")'], cols=cols, env=env, cwd=cwd) + pty.wait_till(lambda: 'child ready:' in pty.screen_contents()) + pty.set_window_size(columns=cols + 3) + pty.wait_till(lambda: f'Screen size changed: {cols + 3}' in pty.screen_contents()) + os.close(pty.master_fd) + # test passing of data via cwd, env vars and stdin/stdout redirection stdin_r, stdin_w = os.pipe() os.set_inheritable(stdin_w, False)