aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-20 07:34:50 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-09-23 14:42:57 +0200
commit737f58e23230ea14f1648ac1fc7f442ea0f8563c (patch)
treed16bee4c0ad2bb5ff2ec058cd09133a285674fef /test/functional/api/vim_spec.lua
parent5acdc4499e2036c90172b2b085f207ee4d5cfee4 (diff)
downloadrneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.tar.gz
rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.tar.bz2
rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.zip
refactor(api)!: rename Dictionary => Dict
In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r--test/functional/api/vim_spec.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index ea6b70f4d7..b35ccb0c40 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -693,7 +693,7 @@ describe('API', function()
pcall_err(request, 'nvim_call_dict_function', "{ 'f': '' }", 'f', { 1, 2 })
)
eq(
- 'dict argument type must be String or Dictionary',
+ 'dict argument type must be String or Dict',
pcall_err(request, 'nvim_call_dict_function', 42, 'f', { 1, 2 })
)
eq(
@@ -1573,7 +1573,7 @@ describe('API', function()
it('nvim_get_vvar, nvim_set_vvar', function()
eq('Key is read-only: count', pcall_err(request, 'nvim_set_vvar', 'count', 42))
- eq('Dictionary is locked', pcall_err(request, 'nvim_set_vvar', 'nosuchvar', 42))
+ eq('Dict is locked', pcall_err(request, 'nvim_set_vvar', 'nosuchvar', 42))
api.nvim_set_vvar('errmsg', 'set by API')
eq('set by API', api.nvim_get_vvar('errmsg'))
api.nvim_set_vvar('completed_item', { word = 'a', user_data = vim.empty_dict() })
@@ -2212,7 +2212,7 @@ describe('API', function()
end)
describe('nvim_load_context', function()
- it('sets current editor state to given context dictionary', function()
+ it('sets current editor state to given context dict', function()
local opts = { types = { 'regs', 'jumps', 'bufs', 'gvars' } }
eq({}, parse_context(api.nvim_get_context(opts)))
@@ -2228,7 +2228,7 @@ describe('API', function()
eq({ 1, 2, 3 }, eval('[g:one, g:Two, g:THREE]'))
end)
- it('errors when context dictionary is invalid', function()
+ it('errors when context dict is invalid', function()
eq(
'E474: Failed to convert list to msgpack string buffer',
pcall_err(api.nvim_load_context, { regs = { {} }, jumps = { {} } })