mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(lsp): add snippet regression test (#27618)
This commit is contained in:
parent
c651a0f643
commit
0fcbda5987
@ -228,4 +228,16 @@ describe('vim.snippet', function()
|
|||||||
feed(',2')
|
feed(',2')
|
||||||
eq({ 'for i=1,10,2 do', '\t', 'end' }, buf_lines(0))
|
eq({ 'for i=1,10,2 do', '\t', 'end' }, buf_lines(0))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('updates snippet state when built-in completion menu is visible', function()
|
||||||
|
test_expand_success({ '$1 = function($2)\n$3\nend' }, { ' = function()', '', 'end' })
|
||||||
|
-- Show the completion menu.
|
||||||
|
feed('<C-n>')
|
||||||
|
-- Make sure no item is selected.
|
||||||
|
feed('<C-p>')
|
||||||
|
-- Jump forward (the 2nd tabstop).
|
||||||
|
exec_lua('vim.snippet.jump(1)')
|
||||||
|
feed('foo')
|
||||||
|
eq({ ' = function(foo)', '', 'end' }, buf_lines(0))
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user