mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 22:10:45 +00:00
api: Replace set_var(name, NIL) with del_var(name)
This commit is contained in:
@@ -3,6 +3,9 @@ local helpers = require('test.functional.helpers')
|
||||
local clear, nvim, tabpage, curtab, eq, ok =
|
||||
helpers.clear, helpers.nvim, helpers.tabpage, helpers.curtab, helpers.eq,
|
||||
helpers.ok
|
||||
local wait = helpers.wait
|
||||
local curtabmeths = helpers.curtabmeths
|
||||
local funcs = helpers.funcs
|
||||
|
||||
describe('tabpage_* functions', function()
|
||||
before_each(clear)
|
||||
@@ -21,11 +24,14 @@ describe('tabpage_* functions', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('{get,set}_var', function()
|
||||
describe('{get,set,del}_var', function()
|
||||
it('works', function()
|
||||
curtab('set_var', 'lua', {1, 2, {['3'] = 1}})
|
||||
eq({1, 2, {['3'] = 1}}, curtab('get_var', 'lua'))
|
||||
eq({1, 2, {['3'] = 1}}, nvim('eval', 't:lua'))
|
||||
eq(1, funcs.exists('t:lua'))
|
||||
curtabmeths.del_var('lua')
|
||||
eq(0, funcs.exists('t:lua'))
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user