aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/command_line_completion_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:40:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:40:31 +0000
commit339e2d15cc26fe86988ea06468d912a46c8d6f29 (patch)
treea6167fc8fcfc6ae2dc102f57b2473858eac34063 /test/functional/lua/command_line_completion_spec.lua
parent067dc73729267c0262438a6fdd66e586f8496946 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.gz
rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.bz2
rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.zip
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
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,