aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r--test/functional/lua/vim_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index a0428ed933..4f401eed8f 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -2915,6 +2915,15 @@ describe('lua stdlib', function()
return a
]])
end)
+
+ it('accepts the key name', function()
+ eq({ b = 'b', c = 'c' }, exec_lua [[
+ local a = vim.defaulttable(function(k) return k end)
+ local _ = a.b
+ local _ = a.c
+ return a
+ ]])
+ end)
end)
it('vim.lua_omnifunc', function()