diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2015-04-12 22:13:45 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2015-04-17 16:12:32 +0200 |
commit | 26fedb133d817274a9f4bf54f97d3e5adfba67b4 (patch) | |
tree | 978df71b40d2b5aa56e77463c5e286c129398aa3 /test | |
parent | edb13791bd6eda43ab3816c7697530b378680e61 (diff) | |
download | rneovim-26fedb133d817274a9f4bf54f97d3e5adfba67b4.tar.gz rneovim-26fedb133d817274a9f4bf54f97d3e5adfba67b4.tar.bz2 rneovim-26fedb133d817274a9f4bf54f97d3e5adfba67b4.zip |
clipboard: cleanup `valid_yank_reg` and use it for `:redir`
This fixes missing clipboard support for `:redir`
Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Scott Prager <splinterofchaos@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/clipboard/clipboard_provider_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua index 52fdfaa8f4..716bd88242 100644 --- a/test/functional/clipboard/clipboard_provider_spec.lua +++ b/test/functional/clipboard/clipboard_provider_spec.lua @@ -305,4 +305,28 @@ describe('clipboard usage', function() feed(':<c-r>*<cr>') expect('t/u/t/') end) + + it('supports :redir @*>', function() + execute("let g:test_clip['*'] = ['stuff']") + execute('redir @*>') + -- it is made empty + eq({{''}, 'v'}, eval("g:test_clip['*']")) + execute('let g:test = doesnotexist') + feed('<cr>') + eq({{ + '', + '', + 'E121: Undefined variable: doesnotexist', + 'E15: Invalid expression: doesnotexist', + }, 'v'}, eval("g:test_clip['*']")) + execute(':echo "Howdy!"') + eq({{ + '', + '', + 'E121: Undefined variable: doesnotexist', + 'E15: Invalid expression: doesnotexist', + '', + 'Howdy!', + }, 'v'}, eval("g:test_clip['*']")) + end) end) |