eval/shada: Add testing for unnamed register with setreg and startup

This commit is contained in:
AdnoC
2016-05-04 14:17:09 -04:00
parent 9a91ce4fa6
commit beca4dc16c
3 changed files with 51 additions and 1 deletions

View File

@@ -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/'])]=])