diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-15 15:39:58 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-06 21:56:39 -0400 |
commit | 343c226abf519a705e8c648a8d9f04d2b93e6b77 (patch) | |
tree | 876e537655e9634da399dc90551ccd72924d4e20 /src | |
parent | 1b3cbb39a15aa006ad3504966851352b4a5a71f2 (diff) | |
download | rneovim-343c226abf519a705e8c648a8d9f04d2b93e6b77.tar.gz rneovim-343c226abf519a705e8c648a8d9f04d2b93e6b77.tar.bz2 rneovim-343c226abf519a705e8c648a8d9f04d2b93e6b77.zip |
vim-patch:8.0.1811: no test for winrestcmd()
Problem: No test for winrestcmd().
Solution: Add a test. (Dominique Pelle, closes vim/vim#2894)
https://github.com/vim/vim/commit/72cf47a279f7261abf4ae6c9c3ee54024ee87a12
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_window_cmd.vim | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index 3ee96e36ca..ad60c8d3c7 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -17,7 +17,7 @@ func Test_window_cmd_ls0_with_split() endfunc func Test_window_cmd_cmdwin_with_vsp() - let efmt='Expected 0 but got %d (in ls=%d, %s window)' + let efmt = 'Expected 0 but got %d (in ls=%d, %s window)' for v in range(0, 2) exec "set ls=" . v vsplit @@ -432,21 +432,21 @@ func Test_window_contents() exe "norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+" redraw - let s3=GetScreenStr(1) + let s3 = GetScreenStr(1) wincmd p call assert_equal(1, line("w0")) call assert_equal('1 ', s3) exe "norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+" redraw - let s3=GetScreenStr(1) + let s3 = GetScreenStr(1) wincmd p call assert_equal(50, line("w0")) call assert_equal('50 ', s3) exe "norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+" redraw - let s3=GetScreenStr(1) + let s3 = GetScreenStr(1) wincmd p call assert_equal(59, line("w0")) call assert_equal('59 ', s3) @@ -490,4 +490,19 @@ func Test_visual_cleared_after_window_split() bwipe! endfunc +func Test_winrestcmd() + 2split + 3vsplit + let a = winrestcmd() + call assert_equal(2, winheight(0)) + call assert_equal(3, winwidth(0)) + wincmd = + call assert_notequal(2, winheight(0)) + call assert_notequal(3, winwidth(0)) + exe a + call assert_equal(2, winheight(0)) + call assert_equal(3, winwidth(0)) + only +endfunc + " vim: shiftwidth=2 sts=2 expandtab |