diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-12-27 22:49:44 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-12-27 22:49:44 +0100 |
commit | c1015121ec626cab6cb384f544bc0be1a1760c0e (patch) | |
tree | 6cc9a5d1899a4486a24c491e07d17a7dd01f9503 /test/functional/terminal/window_split_tab_spec.lua | |
parent | 4f030ec24e0e148bbb83aedaef7dd629e5fef130 (diff) | |
parent | e1876c7ad1b5e30c0a9919e2c4587d11550c8507 (diff) | |
download | rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.gz rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.bz2 rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.zip |
Merge 'upstream/master' into pr-win-erw7
Diffstat (limited to 'test/functional/terminal/window_split_tab_spec.lua')
-rw-r--r-- | test/functional/terminal/window_split_tab_spec.lua | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua index 07cc8020a5..fecffe3295 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 @@ -67,17 +68,22 @@ describe('terminal', function() end) 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) + feed([[<C-\><C-N>G:]]) -- Go to cmdline-mode, so cursor is at bottom. + local w1, h1 = screen._width - 3, screen._height - 2 + local w2, h2 = w1 - 6, h1 - 3 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'} + -- win: SIGWINCH is unreliable, use a weaker test. #7506 + retry(3, 30000, function() + screen:try_resize(w1, h1) + screen:expect{any='rows: 7, cols: 47'} + screen:try_resize(w2, h2) + screen:expect{any='rows: 4, cols: 41'} + end) return end + screen:try_resize(w1, h1) screen:expect([[ tty ready | rows: 7, cols: 47 | @@ -88,7 +94,7 @@ describe('terminal', function() | :^ | ]]) - screen:try_resize(screen._width - 6, screen._height - 3) + screen:try_resize(w2, h2) screen:expect([[ tty ready | rows: 7, cols: 47 | |