aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-26 10:49:32 +0800
committerGitHub <noreply@github.com>2023-03-26 10:49:32 +0800
commit4863ca6b8902c5b0aab95f2af640118cd417d379 (patch)
tree41a1ecb32984dc88f25df722abaf3ba381db3cf3 /test/functional/api/extmark_spec.lua
parent4eef5ac453866dae7c03f5432fc8c4dfcda19f54 (diff)
downloadrneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.tar.gz
rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.tar.bz2
rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.zip
test: use exec_capture() in more places (#22787)
Problem: Using `meths.exec2("code", { output = true })` is too verbose. Solution: Use exec_capture() in more places.
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r--test/functional/api/extmark_spec.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index e9a175625b..3882fc90ca 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -11,6 +11,7 @@ local insert = helpers.insert
local feed = helpers.feed
local clear = helpers.clear
local command = helpers.command
+local exec = helpers.exec
local meths = helpers.meths
local assert_alive = helpers.assert_alive
@@ -1413,12 +1414,12 @@ describe('API/extmarks', function()
end)
it('does not crash with append/delete/undo sequence', function()
- meths.exec2([[
+ exec([[
let ns = nvim_create_namespace('myplugin')
call nvim_buf_set_extmark(0, ns, 0, 0, {})
call append(0, '')
%delete
- undo]], { output = false })
+ undo]])
assert_alive()
end)
@@ -1450,7 +1451,7 @@ describe('API/extmarks', function()
feed('u')
-- handles pasting
- meths.exec2([[let @a='asdfasdf']], { output = false })
+ exec([[let @a='asdfasdf']])
feed([["ap]])
eq({ {1, 0, 0}, {2, 0, 8} },
meths.buf_get_extmarks(0, ns, 0, -1, {}))