mirror of
https://github.com/neovim/neovim.git
synced 2025-11-21 17:46:30 +00:00
test: make Ex mode exit test test what it wants to test (#19728)
This commit is contained in:
@@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
|||||||
local assert_alive = helpers.assert_alive
|
local assert_alive = helpers.assert_alive
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
local feed_command = helpers.feed_command
|
local feed_command = helpers.feed_command
|
||||||
|
local feed = helpers.feed
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local run = helpers.run
|
local run = helpers.run
|
||||||
@@ -36,11 +37,12 @@ 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()
|
it('is 0 on exit from Ex mode involving try-catch vim-patch:8.0.0184', function()
|
||||||
local function on_setup()
|
local function on_setup()
|
||||||
command('autocmd VimLeavePre * call rpcrequest('..cid..', "")')
|
command('autocmd VimLeavePre * call rpcrequest('..cid..', "")')
|
||||||
command('autocmd VimLeave * call rpcrequest('..cid..', "")')
|
command('autocmd VimLeave * call rpcrequest('..cid..', "")')
|
||||||
feed_command('call feedkey("Q")','try', 'call NoFunction()', 'catch', 'echo "bye"', 'endtry', 'quit')
|
feed('gQ')
|
||||||
|
feed_command('try', 'call NoFunction()', 'catch', 'echo "bye"', 'endtry', 'quit')
|
||||||
end
|
end
|
||||||
local function on_request()
|
local function on_request()
|
||||||
eq(0, eval('v:exiting'))
|
eq(0, eval('v:exiting'))
|
||||||
|
|||||||
Reference in New Issue
Block a user