diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-24 18:30:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-24 18:30:35 +0100 |
| commit | 38274051c066ff0a28582aae5c2edf47825d9f57 (patch) | |
| tree | 19fba05c7d751fd3ee9aaa20b6a65675a6001c3e /src/nvim/testdir/test_functions.vim | |
| parent | a62ec4eb989f41ace8e6b7f085349a2bce964d68 (diff) | |
| parent | 7214d0bc846179a862e8d3061d00270a6caa0d7b (diff) | |
| download | rneovim-38274051c066ff0a28582aae5c2edf47825d9f57.tar.gz rneovim-38274051c066ff0a28582aae5c2edf47825d9f57.tar.bz2 rneovim-38274051c066ff0a28582aae5c2edf47825d9f57.zip | |
Merge pull request #6323 from justinmk/vimpatches
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 + |