aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/eval_spec.lua
diff options
context:
space:
mode:
authorAdnoC <adam.r.cutler@gmail.com>2016-05-04 14:17:09 -0400
committerAdnoC <adam.r.cutler@gmail.com>2017-05-31 13:19:08 -0400
commitbeca4dc16c0cc45b97bb04891b19350308026f1f (patch)
treeb42bcf361dadc3eed0fe15c5ceaf5010d8b7d4aa /test/functional/legacy/eval_spec.lua
parent9a91ce4fa6a7504644e10a6761eae5cc5699159a (diff)
downloadrneovim-beca4dc16c0cc45b97bb04891b19350308026f1f.tar.gz
rneovim-beca4dc16c0cc45b97bb04891b19350308026f1f.tar.bz2
rneovim-beca4dc16c0cc45b97bb04891b19350308026f1f.zip
eval/shada: Add testing for unnamed register with setreg and startup
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/'])]=])