diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2016-06-20 20:47:23 +0200 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2016-06-20 23:10:46 +0200 |
commit | 1a8d9e9d542129dca71e7baf8f38bd48008310cf (patch) | |
tree | c186deb62b0c3e69edfb26f312511f178d7a7265 /test/functional/terminal/window_split_tab_spec.lua | |
parent | a05e7a6bcae57eefcc3dd40c756c37793eeb21a0 (diff) | |
download | rneovim-1a8d9e9d542129dca71e7baf8f38bd48008310cf.tar.gz rneovim-1a8d9e9d542129dca71e7baf8f38bd48008310cf.tar.bz2 rneovim-1a8d9e9d542129dca71e7baf8f38bd48008310cf.zip |
Add tests for new feature
Diffstat (limited to 'test/functional/terminal/window_split_tab_spec.lua')
-rw-r--r-- | test/functional/terminal/window_split_tab_spec.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua index 5a6b59c8fc..644060103a 100644 --- a/test/functional/terminal/window_split_tab_spec.lua +++ b/test/functional/terminal/window_split_tab_spec.lua @@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local clear = helpers.clear local feed, nvim = helpers.feed, helpers.nvim +local execute = helpers.execute describe('terminal', function() local screen @@ -21,6 +22,49 @@ describe('terminal', function() screen:detach() end) + it('resets its size when entering terminal window', function() + feed('<c-\\><c-n>') + execute('2split') + screen:expect([[ + tty ready | + ^rows: 2, cols: 50 | + ========== | + tty ready | + rows: 2, cols: 50 | + {2: } | + ~ | + ~ | + ========== | + | + ]]) + execute('wincmd p') + screen:expect([[ + tty ready | + rows: 2, cols: 50 | + ========== | + tty ready | + rows: 2, cols: 50 | + rows: 5, cols: 50 | + {2: } | + ^ | + ========== | + :wincmd p | + ]]) + execute('wincmd p') + screen:expect([[ + rows: 5, cols: 50 | + ^rows: 2, cols: 50 | + ========== | + rows: 5, cols: 50 | + rows: 2, cols: 50 | + {2: } | + ~ | + ~ | + ========== | + :wincmd p | + ]]) + end) + describe('when the screen is resized', function() it('will forward a resize request to the program', function() screen:try_resize(screen._width + 3, screen._height + 5) |