aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-03-18 19:33:25 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-18 19:33:25 +0100
commit6a68a922b829866634c3758b1ef612f61c56ca6c (patch)
tree12588ff37b0b8806a219090abadfde78ca670f2f /test
parentbdcb2a38b3667c01efada0c6ed9414426f1c0468 (diff)
downloadrneovim-6a68a922b829866634c3758b1ef612f61c56ca6c.tar.gz
rneovim-6a68a922b829866634c3758b1ef612f61c56ca6c.tar.bz2
rneovim-6a68a922b829866634c3758b1ef612f61c56ca6c.zip
clipboard: set v:register after startup (#5708)
Fixes #5697
Diffstat (limited to 'test')
-rw-r--r--test/functional/clipboard/clipboard_provider_spec.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua
index 2b26697b97..d969d4a487 100644
--- a/test/functional/clipboard/clipboard_provider_spec.lua
+++ b/test/functional/clipboard/clipboard_provider_spec.lua
@@ -89,9 +89,12 @@ describe('the unnamed register', function()
end)
describe('clipboard usage', function()
+ local function reset(...)
+ clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp', ...)
+ end
+
before_each(function()
- clear()
- execute('let &rtp = "test/functional/fixtures,".&rtp')
+ reset()
execute('call getreg("*")') -- force load of provider
end)
@@ -363,6 +366,13 @@ describe('clipboard usage', function()
end)
end)
+ it('sets v:register after startup', function()
+ reset()
+ eq('"', eval('v:register'))
+ reset('--cmd', 'set clipboard=unnamed')
+ eq('*', eval('v:register'))
+ end)
+
it('supports :put', function()
insert("a line")
execute("let g:test_clip['*'] = ['some text']")