diff options
Diffstat (limited to 'test/functional/lua')
-rw-r--r-- | test/functional/lua/command_line_completion_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/lua/command_line_completion_spec.lua b/test/functional/lua/command_line_completion_spec.lua index f8786a45bb..ae0ab19d6b 100644 --- a/test/functional/lua/command_line_completion_spec.lua +++ b/test/functional/lua/command_line_completion_spec.lua @@ -107,6 +107,30 @@ describe('nlua_expand_pat', function() eq({ { 'set' }, 11 }, get_completions('vim.keymap.se')) end) + it('should exclude private fields after "."', function() + eq( + { { 'bar' }, 4 }, + get_completions('foo.', { + foo = { + _bar = true, + bar = true, + }, + }) + ) + end) + + it('should include private fields after "._"', function() + eq( + { { '_bar' }, 4 }, + get_completions('foo._', { + foo = { + _bar = true, + bar = true, + }, + }) + ) + end) + it('should be able to interpolate globals', function() eq( { { |