mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
@@ -6,6 +6,8 @@ local curtabmeths = helpers.curtabmeths
|
||||
local funcs = helpers.funcs
|
||||
local request = helpers.request
|
||||
local NIL = helpers.NIL
|
||||
local meth_pcall = helpers.meth_pcall
|
||||
local command = helpers.command
|
||||
|
||||
describe('api/tabpage', function()
|
||||
before_each(clear)
|
||||
@@ -32,6 +34,11 @@ describe('api/tabpage', function()
|
||||
eq(1, funcs.exists('t:lua'))
|
||||
curtabmeths.del_var('lua')
|
||||
eq(0, funcs.exists('t:lua'))
|
||||
eq({false, 'Key "lua" doesn\'t exist'}, meth_pcall(curtabmeths.del_var, 'lua'))
|
||||
curtabmeths.set_var('lua', 1)
|
||||
command('lockvar t:lua')
|
||||
eq({false, 'Key is locked: lua'}, meth_pcall(curtabmeths.del_var, 'lua'))
|
||||
eq({false, 'Key is locked: lua'}, meth_pcall(curtabmeths.set_var, 'lua', 1))
|
||||
end)
|
||||
|
||||
it('tabpage_set_var returns the old value', function()
|
||||
|
||||
Reference in New Issue
Block a user