aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/buffer_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-02-11 02:01:17 +0300
committerZyX <kp-pav@yandex.ru>2016-04-18 02:47:13 +0300
commitf1ced96c28b7db7b3dad9b0ca2f71f8d046ef732 (patch)
tree650bafc7e2d19fe535a93973fe5bf176b03a33f0 /test/functional/api/buffer_spec.lua
parentaf6603a6b4c9b1cb4a65eb2dc581295d8990c5ef (diff)
downloadrneovim-f1ced96c28b7db7b3dad9b0ca2f71f8d046ef732.tar.gz
rneovim-f1ced96c28b7db7b3dad9b0ca2f71f8d046ef732.tar.bz2
rneovim-f1ced96c28b7db7b3dad9b0ca2f71f8d046ef732.zip
api: Replace set_var(name, NIL) with del_var(name)
Diffstat (limited to 'test/functional/api/buffer_spec.lua')
-rw-r--r--test/functional/api/buffer_spec.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/api/buffer_spec.lua b/test/functional/api/buffer_spec.lua
index a15d489a1f..0eefa25a13 100644
--- a/test/functional/api/buffer_spec.lua
+++ b/test/functional/api/buffer_spec.lua
@@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')
local clear, nvim, buffer = helpers.clear, helpers.nvim, helpers.buffer
local curbuf, curwin, eq = helpers.curbuf, helpers.curwin, helpers.eq
local curbufmeths, ok = helpers.curbufmeths, helpers.ok
+local funcs = helpers.funcs
describe('buffer_* functions', function()
before_each(clear)
@@ -234,11 +235,14 @@ describe('buffer_* functions', function()
end)
- describe('{get,set}_var', function()
+ describe('{get,set,del}_var', function()
it('works', function()
curbuf('set_var', 'lua', {1, 2, {['3'] = 1}})
eq({1, 2, {['3'] = 1}}, curbuf('get_var', 'lua'))
eq({1, 2, {['3'] = 1}}, nvim('eval', 'b:lua'))
+ eq(1, funcs.exists('b:lua'))
+ curbufmeths.del_var('lua')
+ eq(0, funcs.exists('b:lua'))
end)
end)