mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
test(completion_spec): make Enter test descriptions more accurate
This commit is contained in:
@@ -460,7 +460,7 @@ describe('completion', function()
|
|||||||
June]])
|
June]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('Enter does not select original text', function()
|
it('Enter inserts newline at original text after adding leader', function()
|
||||||
feed('iJ<C-x><C-u>')
|
feed('iJ<C-x><C-u>')
|
||||||
poke_eventloop()
|
poke_eventloop()
|
||||||
feed('u')
|
feed('u')
|
||||||
@@ -506,21 +506,23 @@ describe('completion', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('Enter selects original text after adding leader and insert newline', function()
|
it('Enter inserts newline at original text after adding leader', function()
|
||||||
feed('iJ<C-x><C-u>')
|
feed('iJ<C-x><C-u>')
|
||||||
poke_eventloop()
|
poke_eventloop()
|
||||||
feed('u')
|
feed('u')
|
||||||
poke_eventloop()
|
poke_eventloop()
|
||||||
feed('<CR>')
|
feed('<CR>')
|
||||||
expect([[Ju
|
expect([[
|
||||||
]])
|
Ju
|
||||||
|
]])
|
||||||
feed('<Esc>')
|
feed('<Esc>')
|
||||||
poke_eventloop()
|
poke_eventloop()
|
||||||
-- The behavior should be the same when completion has been interrupted,
|
-- The behavior should be the same when completion has been interrupted,
|
||||||
-- which can happen interactively if the completion function is slow.
|
-- which can happen interactively if the completion function is slow.
|
||||||
feed('ggVGSJ<C-x><C-u>u<CR>')
|
feed('ggVGSJ<C-x><C-u>u<CR>')
|
||||||
expect([[Ju
|
expect([[
|
||||||
]])
|
Ju
|
||||||
|
]])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@@ -94,7 +94,7 @@ describe('edit', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- oldtest: Test_edit_CAR()
|
-- oldtest: Test_edit_CAR()
|
||||||
it('insert a newline when pressing Enter, even if the pum is visible', function()
|
it('Enter inserts newline with pum at original text after adding leader', function()
|
||||||
local screen = Screen.new(10, 6)
|
local screen = Screen.new(10, 6)
|
||||||
command('set cot=menu,menuone,noselect')
|
command('set cot=menu,menuone,noselect')
|
||||||
feed('Shello hero<CR>h<C-X><C-N>e')
|
feed('Shello hero<CR>h<C-X><C-N>e')
|
||||||
|
Reference in New Issue
Block a user