aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/command_line_completion_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /test/functional/lua/command_line_completion_spec.lua
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.gz
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.bz2
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'test/functional/lua/command_line_completion_spec.lua')
-rw-r--r--test/functional/lua/command_line_completion_spec.lua15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/functional/lua/command_line_completion_spec.lua b/test/functional/lua/command_line_completion_spec.lua
index 3a5966755e..177e077f4a 100644
--- a/test/functional/lua/command_line_completion_spec.lua
+++ b/test/functional/lua/command_line_completion_spec.lua
@@ -5,7 +5,7 @@ local eq = helpers.eq
local exec_lua = helpers.exec_lua
local get_completions = function(input, env)
- return exec_lua("return {vim._expand_pat(...)}", '^' .. input, env)
+ return exec_lua("return {vim._expand_pat(...)}", input, env)
end
local get_compl_parts = function(parts)
@@ -31,14 +31,12 @@ describe('nlua_expand_pat', function()
eq(
{{
'nvim_buf_set_lines',
- 'nvim_buf_set_option'
}, 8
},
get_completions('vim.api.nvim_buf_', {
vim = {
api = {
nvim_buf_set_lines = true,
- nvim_buf_set_option = true,
nvim_win_doesnt_match = true,
},
other_key = true,
@@ -68,14 +66,12 @@ describe('nlua_expand_pat', function()
eq(
{{
'nvim_buf_set_lines',
- 'nvim_buf_set_option'
}, 11
},
get_completions('vim["api"].nvim_buf_', {
vim = {
api = {
nvim_buf_set_lines = true,
- nvim_buf_set_option = true,
nvim_win_doesnt_match = true,
},
other_key = true,
@@ -88,7 +84,6 @@ describe('nlua_expand_pat', function()
eq(
{{
'nvim_buf_set_lines',
- 'nvim_buf_set_option'
}, 21
},
get_completions('vim["nested"]["api"].nvim_buf_', {
@@ -96,7 +91,6 @@ describe('nlua_expand_pat', function()
nested = {
api = {
nvim_buf_set_lines = true,
- nvim_buf_set_option = true,
nvim_win_doesnt_match = true,
},
},
@@ -107,9 +101,12 @@ describe('nlua_expand_pat', function()
end)
it('should work with lazy submodules of "vim" global', function()
- eq({{ 'inspect' }, 4 },
+ eq({{ 'inspect', 'inspect_pos' }, 4 },
get_completions('vim.inspec'))
+ eq({{ 'treesitter' }, 4 },
+ get_completions('vim.treesi'))
+
eq({{ 'set' }, 11 },
get_completions('vim.keymap.se'))
end)
@@ -118,7 +115,6 @@ describe('nlua_expand_pat', function()
eq(
{{
'nvim_buf_set_lines',
- 'nvim_buf_set_option'
}, 12
},
get_completions('vim[MY_VAR].nvim_buf_', {
@@ -126,7 +122,6 @@ describe('nlua_expand_pat', function()
vim = {
api = {
nvim_buf_set_lines = true,
- nvim_buf_set_option = true,
nvim_win_doesnt_match = true,
},
other_key = true,