aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-11-05 01:15:20 +0100
committerGitHub <noreply@github.com>2018-11-05 01:15:20 +0100
commit8086db6302c7b5eb29ee5440dd4baf6d6894868f (patch)
tree864f5f9b99c2f64e03d41444033af1997087ca98 /test
parent47473b39cb2b88c660e5a9959836440d5cd25d76 (diff)
parent2c085257fdfab7c60fa5369771f9ba63f2907333 (diff)
downloadrneovim-8086db6302c7b5eb29ee5440dd4baf6d6894868f.tar.gz
rneovim-8086db6302c7b5eb29ee5440dd4baf6d6894868f.tar.bz2
rneovim-8086db6302c7b5eb29ee5440dd4baf6d6894868f.zip
Merge #9197
Diffstat (limited to 'test')
-rw-r--r--test/functional/eval/timer_spec.lua6
-rw-r--r--test/functional/terminal/window_split_tab_spec.lua14
2 files changed, 12 insertions, 8 deletions
diff --git a/test/functional/eval/timer_spec.lua b/test/functional/eval/timer_spec.lua
index c945f12e0e..d6fba112f1 100644
--- a/test/functional/eval/timer_spec.lua
+++ b/test/functional/eval/timer_spec.lua
@@ -82,7 +82,7 @@ describe('timers', function()
run(nil, nil, nil, 300)
feed("c")
local count = eval("g:val")
- assert(count >= 4, 'expected count >= 4, got: '..tostring(count))
+ assert(count >= 3, 'expected count >= 3, got: '..tostring(count))
eq(99, eval("g:c"))
end)
@@ -144,8 +144,8 @@ describe('timers', function()
local count2 = eval("g:val")
-- when count is eval:ed after timer_stop this should be non-racy
eq(count, count2)
- assert(4 <= count and count <= 7,
- 'expected (4 <= count <= 7), got: '..tostring(count))
+ assert(3 <= count and count <= 7,
+ 'expected (3 <= count <= 7), got: '..tostring(count))
end)
it('can be stopped from the handler', function()
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua
index 07cc8020a5..b8d5e6d43f 100644
--- a/test/functional/terminal/window_split_tab_spec.lua
+++ b/test/functional/terminal/window_split_tab_spec.lua
@@ -7,6 +7,7 @@ local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
local iswin = helpers.iswin
+local retry = helpers.retry
describe('terminal', function()
local screen
@@ -68,16 +69,19 @@ describe('terminal', function()
it('forwards resize request to the program', function()
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
- screen:try_resize(screen._width - 3, screen._height - 2)
if iswin() then
- -- win: less-precise test, SIGWINCH is noisy there. #7506
- screen:expect{any='rows: 7, cols: 47'}
- screen:try_resize(screen._width - 6, screen._height - 3)
- screen:expect{any='rows: 4, cols: 41'}
+ retry(3, nil, function()
+ -- win: SIGWINCH is unreliable. #7506
+ screen:try_resize(screen._width - 3, screen._height - 2)
+ screen:expect{any='rows: 7, cols: 47'}
+ screen:try_resize(screen._width - 6, screen._height - 3)
+ screen:expect{any='rows: 4, cols: 41'}
+ end)
return
end
+ screen:try_resize(screen._width - 3, screen._height - 2)
screen:expect([[
tty ready |
rows: 7, cols: 47 |