diff options
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 848935fc0f..351094567a 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -7,6 +7,7 @@ local ok, nvim_async, feed = helpers.ok, helpers.nvim_async, helpers.feed local os_name = helpers.os_name local meths = helpers.meths local funcs = helpers.funcs +local request = helpers.request describe('vim_* functions', function() before_each(clear) @@ -41,6 +42,10 @@ describe('vim_* functions', function() eq(1, nvim('eval',"matcharg(1) == ['', '']")) eq({'', ''}, nvim('eval','matcharg(1)')) end) + + it('works under deprecated name', function() + eq(2, request("vim_eval", "1+1")) + end) end) describe('call_function', function() @@ -298,4 +303,11 @@ describe('vim_* functions', function() eq(false, status) ok(err:match('Invalid option name') ~= nil) end) + + it("doesn't leak memory on incorrect argument types", function() + local status, err = pcall(nvim, 'change_directory',{'not', 'a', 'dir'}) + eq(false, status) + ok(err:match(': Wrong type for argument 1, expecting String') ~= nil) + end) + end) |