mirror of
https://github.com/neovim/neovim.git
synced 2025-11-10 12:35:29 +00:00
committed by
Justin M. Keyes
parent
29395fd304
commit
8d64a2fb1d
@@ -1,6 +1,7 @@
|
|||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
|
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
|
local feed_command = helpers.feed_command
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local run = helpers.run
|
local run = helpers.run
|
||||||
@@ -33,6 +34,18 @@ describe('v:exiting', function()
|
|||||||
end
|
end
|
||||||
run(on_request, nil, on_setup)
|
run(on_request, nil, on_setup)
|
||||||
end)
|
end)
|
||||||
|
it('is 0 on exit from ex-mode involving try-catch', function()
|
||||||
|
local function on_setup()
|
||||||
|
command('autocmd VimLeavePre * call rpcrequest('..cid..', "")')
|
||||||
|
command('autocmd VimLeave * call rpcrequest('..cid..', "")')
|
||||||
|
feed_command('call feedkey("Q")','try', 'call NoFunction()', 'catch', 'echo "bye"', 'endtry', 'quit')
|
||||||
|
end
|
||||||
|
local function on_request()
|
||||||
|
eq(0, eval('v:exiting'))
|
||||||
|
return ''
|
||||||
|
end
|
||||||
|
run(on_request, nil, on_setup)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe(':cquit', function()
|
describe(':cquit', function()
|
||||||
|
|||||||
Reference in New Issue
Block a user