aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2023-08-30 19:15:49 -0700
committerGitHub <noreply@github.com>2023-08-31 10:15:49 +0800
commitee56daebb6468075e743db0d605cb3f2a1699419 (patch)
treeee662a8897eec0b372f880d514f5f3fe2e325988 /test/functional
parent67fba9affa14f2f3cd30371568c01d39f3e5f4d4 (diff)
downloadrneovim-ee56daebb6468075e743db0d605cb3f2a1699419.tar.gz
rneovim-ee56daebb6468075e743db0d605cb3f2a1699419.tar.bz2
rneovim-ee56daebb6468075e743db0d605cb3f2a1699419.zip
fix(shada): update deleted marks (#24936)
Fix #4295 Close #16067 Co-authored-by: chentau <tchen1998@gmail.com>
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/shada/marks_spec.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua
index a91be18841..07364382e8 100644
--- a/test/functional/shada/marks_spec.lua
+++ b/test/functional/shada/marks_spec.lua
@@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each)
local meths, curwinmeths, curbufmeths, nvim_command, funcs, eq =
helpers.meths, helpers.curwinmeths, helpers.curbufmeths, helpers.command,
helpers.funcs, helpers.eq
+local feed = helpers.feed
local exc_exec, exec_capture = helpers.exc_exec, helpers.exec_capture
local expect_exit = helpers.expect_exit
@@ -248,4 +249,24 @@ describe('ShaDa support code', function()
eq('', funcs.system(argv))
eq(0, exc_exec('rshada'))
end)
+
+ it('updates deleted marks', function()
+ nvim_command('edit ' .. testfilename)
+
+ nvim_command('mark A')
+ nvim_command('mark a')
+ -- create a change to set the '.' mark,
+ -- since it can't be set via :mark
+ feed('ggifoobar<esc>')
+ nvim_command('wshada')
+ nvim_command('normal! `A`a`.')
+
+ nvim_command('delmarks A a .')
+ nvim_command('wshada')
+
+ reset()
+ eq('Vim(normal):E20: Mark not set', exc_exec('normal! `A'))
+ eq('Vim(normal):E20: Mark not set', exc_exec('normal! `a'))
+ eq('Vim(normal):E20: Mark not set', exc_exec('normal! `.'))
+ end)
end)