aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-24 23:06:36 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-03-24 23:06:36 +0100
commit5fecd59c2616af7f46764b981ff87e820ac42638 (patch)
tree6763daeaa12d7ffaa850dffece35badf723f79bf /test
parent131aad953c007d382cbff1d2560471b29975da87 (diff)
parent8d64a2fb1dc2ae05ab3458ce15d4f18202337dd0 (diff)
downloadrneovim-5fecd59c2616af7f46764b981ff87e820ac42638.tar.gz
rneovim-5fecd59c2616af7f46764b981ff87e820ac42638.tar.bz2
rneovim-5fecd59c2616af7f46764b981ff87e820ac42638.zip
Merge #8167, #7943
Diffstat (limited to 'test')
-rw-r--r--test/functional/core/exit_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/core/exit_spec.lua b/test/functional/core/exit_spec.lua
index 188a6a2c11..80c65e4544 100644
--- a/test/functional/core/exit_spec.lua
+++ b/test/functional/core/exit_spec.lua
@@ -1,6 +1,7 @@
local helpers = require('test.functional.helpers')(after_each)
local command = helpers.command
+local feed_command = helpers.feed_command
local eval = helpers.eval
local eq = helpers.eq
local run = helpers.run
@@ -33,6 +34,18 @@ describe('v:exiting', function()
end
run(on_request, nil, on_setup)
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)
describe(':cquit', function()