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.
This commit is contained in:
erw7
2017-03-31 05:40:37 +09:00
committed by Justin M. Keyes
parent 3b992f1688
commit 1614e805b3
3 changed files with 44 additions and 34 deletions

View File

@@ -3,7 +3,7 @@ local helpers = require('test.functional.helpers')(after_each)
local thelpers = require('test.functional.terminal.helpers')
local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf
local feed, nvim_dir, feed_command = helpers.feed, helpers.nvim_dir, helpers.feed_command
local iswin, wait_sigwinch = helpers.iswin, thelpers.wait_sigwinch
local iswin, print_screen_size = helpers.iswin, thelpers.print_screen_size
local eval = helpers.eval
local command = helpers.command
local wait = helpers.wait
@@ -142,7 +142,7 @@ describe('terminal scrollback', function()
local function will_hide_top_line()
screen:try_resize(screen._width, screen._height - 1)
if iswin() then
wait_sigwinch()
print_screen_size()
end
screen:expect([[
line2 |
@@ -161,7 +161,7 @@ describe('terminal scrollback', function()
will_hide_top_line()
screen:try_resize(screen._width, screen._height - 2)
if iswin() then
wait_sigwinch()
print_screen_size()
end
end)
@@ -190,7 +190,7 @@ describe('terminal scrollback', function()
before_each(function()
screen:try_resize(screen._width, screen._height - 2)
if iswin() then
wait_sigwinch()
print_screen_size()
end
end)
@@ -214,7 +214,7 @@ describe('terminal scrollback', function()
will_delete_last_two_lines()
screen:try_resize(screen._width, screen._height - 1)
if iswin() then
wait_sigwinch()
print_screen_size()
end
end)
@@ -259,7 +259,7 @@ describe('terminal scrollback', function()
]])
screen:try_resize(screen._width, screen._height - 3)
if iswin() then
wait_sigwinch()
print_screen_size()
end
screen:expect([[
line4 |
@@ -274,7 +274,7 @@ describe('terminal scrollback', function()
local function pop_then_push()
screen:try_resize(screen._width, screen._height + 1)
if iswin() then
wait_sigwinch()
print_screen_size()
end
screen:expect([[
line4 |
@@ -293,7 +293,7 @@ describe('terminal scrollback', function()
eq(8, curbuf('line_count'))
screen:try_resize(screen._width, screen._height + 3)
if iswin() then
wait_sigwinch()
print_screen_size()
end
end)
@@ -331,7 +331,7 @@ describe('terminal scrollback', function()
feed('Gi')
screen:try_resize(screen._width, screen._height + 4)
if iswin() then
wait_sigwinch()
print_screen_size()
end
end)