mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
functionaltest: map error does not cancel prompt
This commit is contained in:
parent
e7ba325298
commit
9c2d5f1a33
@ -831,7 +831,7 @@ describe('Ex commands coloring support', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
it('does not prevent mapping error from cancelling prompt', function()
|
||||
it('does prevent mapping error from cancelling prompt', function()
|
||||
command("cnoremap <expr> x execute('throw 42')[-1]")
|
||||
feed(':#x')
|
||||
screen:expect([[
|
||||
@ -846,14 +846,14 @@ describe('Ex commands coloring support', function()
|
||||
]])
|
||||
feed('<CR>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{EOB:~ }|
|
||||
{EOB:~ }|
|
||||
{EOB:~ }|
|
||||
{EOB:~ }|
|
||||
{EOB:~ }|
|
||||
{EOB:~ }|
|
||||
|
|
||||
:# |
|
||||
{ERR:Error detected while processing :} |
|
||||
{ERR:E605: Exception not caught: 42} |
|
||||
{ERR:E749: empty buffer} |
|
||||
{PE:Press ENTER or type command to continue}^ |
|
||||
]])
|
||||
feed('<CR>')
|
||||
screen:expect([[
|
||||
@ -866,7 +866,7 @@ describe('Ex commands coloring support', function()
|
||||
{EOB:~ }|
|
||||
|
|
||||
]])
|
||||
eq('Error detected while processing :\nE605: Exception not caught: 42',
|
||||
eq('Error detected while processing :\nE605: Exception not caught: 42\nE749: empty buffer',
|
||||
meths.command_output('messages'))
|
||||
end)
|
||||
it('errors out when failing to get callback', function()
|
||||
|
@ -1503,7 +1503,7 @@ describe("'inccommand' and :cnoremap", function()
|
||||
end
|
||||
end)
|
||||
|
||||
it('does not work with a failing mapping', function()
|
||||
it('does work with a failing mapping', function()
|
||||
for _, case in pairs(cases) do
|
||||
refresh(case)
|
||||
feed_command("cnoremap <expr> x execute('bwipeout!')[-1].'x'")
|
||||
@ -1512,7 +1512,10 @@ describe("'inccommand' and :cnoremap", function()
|
||||
|
||||
-- error thrown b/c of the mapping
|
||||
neq(nil, eval('v:errmsg'):find('^E523:'))
|
||||
expect(default_text)
|
||||
expect([[
|
||||
Inc substitution on
|
||||
toxo lines
|
||||
]])
|
||||
end
|
||||
end)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user