diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2022-06-22 13:19:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 13:19:03 -0600 |
commit | c94325288a1008b5eabe7ae0fd03aa906686ee1b (patch) | |
tree | 76128f4b149ac19519678a7d7e98a74535e86a07 /test/functional/lua/vim_spec.lua | |
parent | b20b28249b1c58698be09c5b9d6785cfb1b12fb3 (diff) | |
download | rneovim-c94325288a1008b5eabe7ae0fd03aa906686ee1b.tar.gz rneovim-c94325288a1008b5eabe7ae0fd03aa906686ee1b.tar.bz2 rneovim-c94325288a1008b5eabe7ae0fd03aa906686ee1b.zip |
fix(api): check error after getting win/buf handle (#19052)
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 44e65afc78..646c5ac8ca 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -1400,6 +1400,8 @@ describe('lua stdlib', function() pcall_err(exec_lua, 'return vim.bo.nosuchopt')) matches("Expected lua string$", pcall_err(exec_lua, 'return vim.bo[0][0].autoread')) + matches("Invalid buffer id: %-1$", + pcall_err(exec_lua, 'return vim.bo[-1].filetype')) end) it('vim.wo', function() @@ -1419,6 +1421,8 @@ describe('lua stdlib', function() pcall_err(exec_lua, 'return vim.wo.notanopt')) matches("Expected lua string$", pcall_err(exec_lua, 'return vim.wo[0][0].list')) + matches("Invalid window id: %-1$", + pcall_err(exec_lua, 'return vim.wo[-1].list')) eq(2, funcs.luaeval "vim.wo[1000].cole") exec_lua [[ vim.wo[1000].cole = 0 |