aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/api')
-rw-r--r--test/functional/api/extmark_spec.lua5
-rw-r--r--test/functional/api/server_requests_spec.lua5
-rw-r--r--test/functional/api/vim_spec.lua5
3 files changed, 9 insertions, 6 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index d2b555ee5b..50b4b85d2a 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -12,6 +12,7 @@ local feed = helpers.feed
local clear = helpers.clear
local command = helpers.command
local meths = helpers.meths
+local assert_alive = helpers.assert_alive
local function expect(contents)
return eq(contents, helpers.curbuf_contents())
@@ -1381,13 +1382,13 @@ describe('API/extmarks', function()
end)
it('does not crash with append/delete/undo seqence', function()
- meths.exec([[
+ meths.exec([[
let ns = nvim_create_namespace('myplugin')
call nvim_buf_set_extmark(0, ns, 0, 0, {})
call append(0, '')
%delete
undo]],false)
- eq(2, meths.eval('1+1')) -- did not crash
+ assert_alive()
end)
it('works with left and right gravity', function()
diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua
index 237a4b01e4..e408890906 100644
--- a/test/functional/api/server_requests_spec.lua
+++ b/test/functional/api/server_requests_spec.lua
@@ -11,6 +11,7 @@ local meths = helpers.meths
local spawn, merge_args = helpers.spawn, helpers.merge_args
local set_session = helpers.set_session
local pcall_err = helpers.pcall_err
+local assert_alive = helpers.assert_alive
describe('server -> client', function()
local cid
@@ -33,7 +34,7 @@ describe('server -> client', function()
call jobstop(ch1)
]])
- eq(2, eval("1+1")) -- Still alive?
+ assert_alive()
end)
describe('simple call', function()
@@ -158,7 +159,7 @@ describe('server -> client', function()
-- do some busywork, so the first request will return
-- before this one
for _ = 1, 5 do
- eq(2, eval("1+1"))
+ assert_alive()
end
eq(1, eval('rpcnotify('..cid..', "nested_done")'))
return 'done!'
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 36a84e1f45..9aad8a1319 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local fmt = string.format
+local assert_alive = helpers.assert_alive
local NIL = helpers.NIL
local clear, nvim, eq, neq = helpers.clear, helpers.nvim, helpers.eq, helpers.neq
local command = helpers.command
@@ -58,7 +59,7 @@ describe('API', function()
eq({'notification', 'nvim_error_event',
{error_types.Exception.id, 'Invalid method: nvim_bogus'}}, next_msg())
-- error didn't close channel.
- eq(2, eval('1+1'))
+ assert_alive()
end)
it('failed async request emits nvim_error_event', function()
@@ -68,7 +69,7 @@ describe('API', function()
{error_types.Exception.id, 'Vim:E492: Not an editor command: bogus'}},
next_msg())
-- error didn't close channel.
- eq(2, eval('1+1'))
+ assert_alive()
end)
it('does not set CA_COMMAND_BUSY #7254', function()