diff options
author | ZyX <kp-pav@yandex.ru> | 2016-02-11 02:01:17 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-04-18 02:47:13 +0300 |
commit | f1ced96c28b7db7b3dad9b0ca2f71f8d046ef732 (patch) | |
tree | 650bafc7e2d19fe535a93973fe5bf176b03a33f0 /test/functional/api/window_spec.lua | |
parent | af6603a6b4c9b1cb4a65eb2dc581295d8990c5ef (diff) | |
download | rneovim-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/window_spec.lua')
-rw-r--r-- | test/functional/api/window_spec.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 17aacafe9b..92a33b4cdb 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -5,6 +5,8 @@ local clear, nvim, curbuf, curbuf_contents, window, curwin, eq, neq, helpers.curbuf_contents, helpers.window, helpers.curwin, helpers.eq, helpers.neq, helpers.ok, helpers.feed, helpers.insert, helpers.eval local wait = helpers.wait +local curwinmeths = helpers.curwinmeths +local funcs = helpers.funcs -- check if str is visible at the beginning of some line local function is_visible(str) @@ -126,11 +128,14 @@ describe('window_* functions', function() end) end) - describe('{get,set}_var', function() + describe('{get,set,del}_var', function() it('works', function() curwin('set_var', 'lua', {1, 2, {['3'] = 1}}) eq({1, 2, {['3'] = 1}}, curwin('get_var', 'lua')) eq({1, 2, {['3'] = 1}}, nvim('eval', 'w:lua')) + eq(1, funcs.exists('w:lua')) + curwinmeths.del_var('lua') + eq(0, funcs.exists('w:lua')) end) end) |