aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-01 09:42:53 -0700
committerGitHub <noreply@github.com>2021-09-01 09:42:53 -0700
commit6751d6254b35d216a86817cd414d5d06e3ff641d (patch)
treea2d6f016fb0b610cd4573477b8d133cca64fb871 /test/functional/ex_cmds
parent0603eba6e713b2bd25cbbb55caf2342b0ccdece9 (diff)
downloadrneovim-6751d6254b35d216a86817cd414d5d06e3ff641d.tar.gz
rneovim-6751d6254b35d216a86817cd414d5d06e3ff641d.tar.bz2
rneovim-6751d6254b35d216a86817cd414d5d06e3ff641d.zip
refactor(tests): use assert_alive() #15546
Diffstat (limited to 'test/functional/ex_cmds')
-rw-r--r--test/functional/ex_cmds/dict_notifications_spec.lua5
-rw-r--r--test/functional/ex_cmds/swapfile_preserve_recover_spec.lua3
2 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/ex_cmds/dict_notifications_spec.lua b/test/functional/ex_cmds/dict_notifications_spec.lua
index e5c9a20db3..21adcf37da 100644
--- a/test/functional/ex_cmds/dict_notifications_spec.lua
+++ b/test/functional/ex_cmds/dict_notifications_spec.lua
@@ -1,4 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
+local assert_alive = helpers.assert_alive
local clear, nvim, source = helpers.clear, helpers.nvim, helpers.source
local insert = helpers.insert
local eq, next_msg = helpers.eq, helpers.next_msg
@@ -325,7 +326,7 @@ describe('VimL dictionary notifications', function()
]])
command('call MakeWatch()')
- eq(2, eval('1+1')) -- Still alive?
+ assert_alive()
end)
end)
@@ -354,7 +355,7 @@ describe('VimL dictionary notifications', function()
command([[call dictwatcherdel(b:, 'changedtick', 'OnTickChanged')]])
insert('t');
- eq(2, eval('1+1')) -- Still alive?
+ assert_alive()
end)
it('does not cause use-after-free when unletting from callback', function()
diff --git a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
index f2a381869e..d91feb4bc1 100644
--- a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
+++ b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
@@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each)
local lfs = require('lfs')
local eq, eval, expect, source =
helpers.eq, helpers.eval, helpers.expect, helpers.source
+local assert_alive = helpers.assert_alive
local clear = helpers.clear
local command = helpers.command
local feed = helpers.feed
@@ -26,7 +27,7 @@ describe(':recover', function()
-- Also check filename ending with ".swp". #9504
eq('Vim(recover):E306: Cannot open '..swapname2,
pcall_err(command, 'recover '..swapname2)) -- Should not segfault. #2117
- eq(2, eval('1+1')) -- Still alive?
+ assert_alive()
end)
end)