diff options
| author | James McCoy <jamessan@jamessan.com> | 2017-04-05 22:39:40 -0400 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2017-04-05 22:39:40 -0400 |
| commit | bb54d921aaf85f0393c1ba10585560056f7f4ec8 (patch) | |
| tree | 316ff7424337b3572b58340383eeabb3a0d36e80 /src/nvim/testdir/test_functions.vim | |
| parent | 4f69a8fb8854698adb2de8956ad0d86ff35a6f68 (diff) | |
| parent | 210b013ce75b5ea8a897071e32decc1e1f88189e (diff) | |
| download | rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.gz rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.bz2 rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.zip | |
Merge remote-tracking branch 'origin/master' into vim-7.4.2170
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
| -rw-r--r-- | src/nvim/testdir/test_functions.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim new file mode 100644 index 0000000000..81cb6314ce --- /dev/null +++ b/src/nvim/testdir/test_functions.vim @@ -0,0 +1,31 @@ +func Test_setbufvar_options() + " This tests that aucmd_prepbuf() and aucmd_restbuf() properly restore the + " window layout. + call assert_equal(1, winnr('$')) + split dummy_preview + resize 2 + set winfixheight winfixwidth + let prev_id = win_getid() + + wincmd j + let wh = winheight('.') + let dummy_buf = bufnr('dummy_buf1', v:true) + call setbufvar(dummy_buf, '&buftype', 'nofile') + execute 'belowright vertical split #' . dummy_buf + call assert_equal(wh, winheight('.')) + let dum1_id = win_getid() + + wincmd h + let wh = winheight('.') + let dummy_buf = bufnr('dummy_buf2', v:true) + call setbufvar(dummy_buf, '&buftype', 'nofile') + execute 'belowright vertical split #' . dummy_buf + call assert_equal(wh, winheight('.')) + + bwipe! + call win_gotoid(prev_id) + bwipe! + call win_gotoid(dum1_id) + bwipe! +endfunc + |