From 4b1f21de75f9981007d80aca8355239e8615d6bd Mon Sep 17 00:00:00 2001 From: erw7 Date: Tue, 28 Mar 2017 18:07:58 +0900 Subject: win: support :terminal --- test/functional/terminal/helpers.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/functional/terminal/helpers.lua') diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index 3b04d17705..29381ab4f0 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -30,10 +30,14 @@ local function clear_attrs() feed_termcode('[0;10m') end -- mouse local function enable_mouse() feed_termcode('[?1002h') end local function disable_mouse() feed_termcode('[?1002l') end +local function wait_sigwinch() + helpers.sleep(1000) + hide_cursor() + show_cursor() +end local default_command = '["'..nvim_dir..'/tty-test'..'"]' - local function screen_setup(extra_rows, command, cols) extra_rows = extra_rows and extra_rows or 0 command = command and command or default_command @@ -112,5 +116,6 @@ return { clear_attrs = clear_attrs, enable_mouse = enable_mouse, disable_mouse = disable_mouse, + wait_sigwinch = wait_sigwinch, screen_setup = screen_setup } -- cgit From 1614e805b33bf159a7af06ed54a0fb5823d8e407 Mon Sep 17 00:00:00 2001 From: erw7 Date: Fri, 31 Mar 2017 05:40:37 +0900 Subject: win/test: tty-test: print screen size explicitly with CTRL-Q tty-test.exe causes abnormal termination with low repeatability, try changing it so as not to use SIGWINCH. --- test/functional/terminal/helpers.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/functional/terminal/helpers.lua') diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index 29381ab4f0..c67640f048 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -30,10 +30,9 @@ local function clear_attrs() feed_termcode('[0;10m') end -- mouse local function enable_mouse() feed_termcode('[?1002h') end local function disable_mouse() feed_termcode('[?1002l') end -local function wait_sigwinch() +local function print_screen_size() helpers.sleep(1000) - hide_cursor() - show_cursor() + nvim('command', 'call jobsend(b:terminal_job_id, "\\")') end local default_command = '["'..nvim_dir..'/tty-test'..'"]' @@ -116,6 +115,6 @@ return { clear_attrs = clear_attrs, enable_mouse = enable_mouse, disable_mouse = disable_mouse, - wait_sigwinch = wait_sigwinch, + print_screen_size = print_screen_size, screen_setup = screen_setup } -- cgit From d3a8c4f99289f7b65a68bf9ed5eeab34aa688e0e Mon Sep 17 00:00:00 2001 From: erw7 Date: Sun, 2 Apr 2017 18:32:23 +0900 Subject: win/pty: log errors --- test/functional/terminal/helpers.lua | 5 ----- 1 file changed, 5 deletions(-) (limited to 'test/functional/terminal/helpers.lua') diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index c67640f048..bd24b9785d 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -30,10 +30,6 @@ local function clear_attrs() feed_termcode('[0;10m') end -- mouse local function enable_mouse() feed_termcode('[?1002h') end local function disable_mouse() feed_termcode('[?1002l') end -local function print_screen_size() - helpers.sleep(1000) - nvim('command', 'call jobsend(b:terminal_job_id, "\\")') -end local default_command = '["'..nvim_dir..'/tty-test'..'"]' @@ -115,6 +111,5 @@ return { clear_attrs = clear_attrs, enable_mouse = enable_mouse, disable_mouse = disable_mouse, - print_screen_size = print_screen_size, screen_setup = screen_setup } -- cgit