From 941b02af4cca9fb98c6ee4a8dd4aa800bd337deb Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Wed, 8 Apr 2015 21:46:12 +0200 Subject: clipboard: adjust v:register when clipboard=unnamed Helped-By: Nicolas Hillegeer Helped-By: Michael Reed --- test/functional/clipboard/clipboard_provider_spec.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/functional') diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua index e7ca183a0e..10a346b8ba 100644 --- a/test/functional/clipboard/clipboard_provider_spec.lua +++ b/test/functional/clipboard/clipboard_provider_spec.lua @@ -72,6 +72,7 @@ end describe('the unnamed register', function() before_each(clear) it('works without provider', function() + eq('"', eval('v:register')) basic_register_test() end) end) @@ -227,6 +228,13 @@ describe('clipboard usage', function() a line]]) end) + it('supports v:register and getreg() without parameters', function() + eq('*', eval('v:register')) + execute("let g:test_clip['*'] = [['some block',''], 'b']") + eq('some block', eval('getreg()')) + eq('\02210', eval('getregtype()')) + end) + end) it('supports :put', function() -- cgit From 9978a01faa14f46f059119ae8bac6a2be944394d Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Wed, 8 Apr 2015 21:47:24 +0200 Subject: clipboard: fix "" register not updated when clipboard=unnamed Helped-By: Scott Prager --- test/functional/clipboard/clipboard_provider_spec.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/functional') diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua index 10a346b8ba..c5d8f57008 100644 --- a/test/functional/clipboard/clipboard_provider_spec.lua +++ b/test/functional/clipboard/clipboard_provider_spec.lua @@ -55,6 +55,12 @@ local function basic_register_test(noblock) , stuff and some more some textsome some text, stuff and some more]]) + -- deleting a line does update "" + feed('ggdd""P') + expect([[ + , stuff and some more + some textsome some text, stuff and some more]]) + feed('ggwjwyggP') if noblock then expect([[ -- cgit