aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2021-11-01 08:46:26 -0500
committerGitHub <noreply@github.com>2021-11-01 07:46:26 -0600
commit961cd83b3b39855b232841f37ded856c8621bd90 (patch)
treef034a91a5f51a346fa4504a290265bb57bfe4b22 /test/functional/api/vim_spec.lua
parentfa97d34858fbb755e8bb6f161c49c18c7187eb4e (diff)
downloadrneovim-961cd83b3b39855b232841f37ded856c8621bd90.tar.gz
rneovim-961cd83b3b39855b232841f37ded856c8621bd90.tar.bz2
rneovim-961cd83b3b39855b232841f37ded856c8621bd90.zip
refactor(api/marks)!: add opts param for feature extensibility (#16146)
In the future we might want to extend the concept of named marks and adding opts reduces the need of changing the function signature in the furute.
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r--test/functional/api/vim_spec.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 2e95b2cf6a..21de4925b5 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -2389,7 +2389,7 @@ describe('API', function()
it('works', function()
local buf = meths.create_buf(false,true)
meths.buf_set_lines(buf, -1, -1, true, {'a', 'bit of', 'text'})
- eq(true, meths.buf_set_mark(buf, 'F', 2, 2))
+ eq(true, meths.buf_set_mark(buf, 'F', 2, 2, {}))
eq(true, meths.del_mark('F'))
eq({0, 0}, meths.buf_get_mark(buf, 'F'))
end)
@@ -2403,9 +2403,9 @@ describe('API', function()
it('works', function()
local buf = meths.create_buf(false,true)
meths.buf_set_lines(buf, -1, -1, true, {'a', 'bit of', 'text'})
- meths.buf_set_mark(buf, 'F', 2, 2)
+ meths.buf_set_mark(buf, 'F', 2, 2, {})
meths.buf_set_name(buf, "mybuf")
- local mark = meths.get_mark('F')
+ local mark = meths.get_mark('F', {})
-- Compare the path tail ony
assert(string.find(mark[4], "mybuf$"))
eq({2, 2, buf.id, mark[4]}, mark)
@@ -2417,7 +2417,7 @@ describe('API', function()
end)
it('returns the expected when mark is not set', function()
eq(true, meths.del_mark('A'))
- eq({0, 0, 0, ''}, meths.get_mark('A'))
+ eq({0, 0, 0, ''}, meths.get_mark('A', {}))
end)
it('works with deleted buffers', function()
local fname = tmpname()
@@ -2425,12 +2425,12 @@ describe('API', function()
nvim("command", "edit " .. fname)
local buf = meths.get_current_buf()
- meths.buf_set_mark(buf, 'F', 2, 2)
+ meths.buf_set_mark(buf, 'F', 2, 2, {})
nvim("command", "new") -- Create new buf to avoid :bd failing
nvim("command", "bd! " .. buf.id)
os.remove(fname)
- local mark = meths.get_mark('F')
+ local mark = meths.get_mark('F', {})
-- To avoid comparing relative vs absolute path
local mfname = mark[4]
local tail_patt = [[[\/][^\/]*$]]