diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-18 21:22:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-18 21:22:04 +0200 |
commit | 339288377072f66ec88e21903e75a82d23ffbf4f (patch) | |
tree | 463cc03171d77c2d3db38bcd6c5e8b76ab1e6492 /src/testdir | |
parent | bfd096d02087a10e8e2f4bdfb74e0435506fa8bb (diff) |
patch 7.4.2226v7.4.2226
Problem: The field names used by getbufinfo(), gettabinfo() and
getwininfo() are not consistent.
Solution: Use bufnr, winnr and tabnr. (Yegappan Lakshmanan)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_bufwintabinfo.vim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim index ec1f538417..1c88cf53af 100644 --- a/src/testdir/test_bufwintabinfo.vim +++ b/src/testdir/test_bufwintabinfo.vim @@ -17,7 +17,7 @@ function Test_getbufwintabinfo() set tabstop&vim let b:editor = 'vim' let l = getbufinfo('%') - call assert_equal(bufnr('%'), l[0].nr) + call assert_equal(bufnr('%'), l[0].bufnr) call assert_equal(8, l[0].options.tabstop) call assert_equal('vim', l[0].variables.editor) call assert_notequal(-1, index(l[0].windows, bufwinid('%'))) @@ -46,25 +46,25 @@ function Test_getbufwintabinfo() tabfirst let winlist = getwininfo() call assert_equal(5, len(winlist)) - call assert_equal(winbufnr(2), winlist[1].bufnum) + call assert_equal(winbufnr(2), winlist[1].bufnr) call assert_equal(winheight(2), winlist[1].height) - call assert_equal(1, winlist[2].nr) + call assert_equal(1, winlist[2].winnr) if has('signs') call assert_equal('auto', winlist[0].options.signcolumn) endif - call assert_equal(2, winlist[3].tpnr) + call assert_equal(2, winlist[3].tabnr) call assert_equal('green', winlist[2].variables.signal) call assert_equal(winwidth(1), winlist[0].width) call assert_equal(w4_id, winlist[3].winid) let winfo = getwininfo(w5_id)[0] - call assert_equal(2, winfo.tpnr) + call assert_equal(2, winfo.tabnr) call assert_equal([], getwininfo(3)) call settabvar(1, 'space', 'build') let tablist = gettabinfo() call assert_equal(2, len(tablist)) call assert_equal(3, len(tablist[1].windows)) - call assert_equal(2, tablist[1].nr) + call assert_equal(2, tablist[1].tabnr) call assert_equal('build', tablist[0].variables.space) call assert_equal(w2_id, tablist[0].windows[0]) call assert_equal([], gettabinfo(3)) |