mirror of
https://github.com/neovim/neovim.git
synced 2026-04-30 11:14:10 +00:00
api: Establish API naming convention. (#5344)
old name: new name: -------------------------------------------------- nvim_name_to_color nvim_get_color_by_name nvim_get_current_buffer nvim_get_current_buf nvim_get_current_window nvim_get_current_win nvim_get_buffers nvim_list_bufs nvim_get_tabpages nvim_list_tabpages nvim_get_windows nvim_list_wins nvim_set_current_buffer nvim_set_current_buf nvim_set_current_window nvim_set_current_win nvim_change_directory nvim_set_current_dir nvim_tabpage_get_window nvim_tabpage_get_win nvim_tabpage_get_windows nvim_tabpage_list_wins nvim_win_get_buffer nvim_win_get_buf nvim_report_error nvim_err_writeln Helped-by: Björn Linse <bjorn.linse@gmail.com> Helped-by: ZyX <kp-pav@yandex.ru> Helped-by: James McCoy <jamessan@jamessan.com>
This commit is contained in:
@@ -11,17 +11,17 @@ local NIL = helpers.NIL
|
||||
describe('tabpage_* functions', function()
|
||||
before_each(clear)
|
||||
|
||||
describe('get_windows and get_window', function()
|
||||
describe('list_wins and get_win', function()
|
||||
it('works', function()
|
||||
nvim('command', 'tabnew')
|
||||
nvim('command', 'vsplit')
|
||||
local tab1, tab2 = unpack(nvim('get_tabpages'))
|
||||
local win1, win2, win3 = unpack(nvim('get_windows'))
|
||||
eq({win1}, tabpage('get_windows', tab1))
|
||||
eq({win2, win3}, tabpage('get_windows', tab2))
|
||||
eq(win2, tabpage('get_window', tab2))
|
||||
nvim('set_current_window', win3)
|
||||
eq(win3, tabpage('get_window', tab2))
|
||||
local tab1, tab2 = unpack(nvim('list_tabpages'))
|
||||
local win1, win2, win3 = unpack(nvim('list_wins'))
|
||||
eq({win1}, tabpage('list_wins', tab1))
|
||||
eq({win2, win3}, tabpage('list_wins', tab2))
|
||||
eq(win2, tabpage('get_win', tab2))
|
||||
nvim('set_current_win', win3)
|
||||
eq(win3, tabpage('get_win', tab2))
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('tabpage_* functions', function()
|
||||
describe('is_valid', function()
|
||||
it('works', function()
|
||||
nvim('command', 'tabnew')
|
||||
local tab = nvim('get_tabpages')[2]
|
||||
local tab = nvim('list_tabpages')[2]
|
||||
nvim('set_current_tabpage', tab)
|
||||
ok(tabpage('is_valid', tab))
|
||||
nvim('command', 'tabclose')
|
||||
|
||||
Reference in New Issue
Block a user