aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/eval_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/eval_spec.lua')
-rw-r--r--test/functional/legacy/eval_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/legacy/eval_spec.lua b/test/functional/legacy/eval_spec.lua
index d7ef508194..1b6f834019 100644
--- a/test/functional/legacy/eval_spec.lua
+++ b/test/functional/legacy/eval_spec.lua
@@ -516,6 +516,15 @@ describe('eval', function()
eq({'item'}, eval("y"))
end)
+ it('sets the unnamed register when the "u" option is passed to setreg', function()
+ execute("call setreg('a','a reg', 'cu')")
+ eq("a reg", eval('@"'))
+ execute("call setreg('b','b reg', 'cu')")
+ eq("b reg", eval('@"'))
+ execute("call setreg('c','c reg', 'c')")
+ eq("b reg", eval('@"'))
+ end)
+
it('search and expressions', function()
command('so test_eval_setup.vim')
command([=[call SetReg('/', ['abc/'])]=])