aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/provider')
-rw-r--r--test/functional/provider/clipboard_spec.lua64
-rw-r--r--test/functional/provider/perl_spec.lua6
2 files changed, 58 insertions, 12 deletions
diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua
index fbaef3ae00..2c5185a974 100644
--- a/test/functional/provider/clipboard_spec.lua
+++ b/test/functional/provider/clipboard_spec.lua
@@ -106,8 +106,53 @@ describe('clipboard', function()
basic_register_test()
end)
- it('`:redir @+>` with invalid g:clipboard shows exactly one error #7184',
- function()
+ it('using "+ in Normal mode with invalid g:clipboard always shows error', function()
+ insert('a')
+ command("let g:clipboard = 'bogus'")
+ feed('"+yl')
+ screen:expect([[
+ ^a |
+ {0:~ }|
+ {0:~ }|
+ clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
+ ]])
+ feed('"+p')
+ screen:expect([[
+ a^a |
+ {0:~ }|
+ {0:~ }|
+ clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
+ ]])
+ end)
+
+ it('using clipboard=unnamedplus with invalid g:clipboard shows error once', function()
+ insert('a')
+ command("let g:clipboard = 'bogus'")
+ command('set clipboard=unnamedplus')
+ feed('yl')
+ screen:expect([[
+ ^a |
+ {0:~ }|
+ {0:~ }|
+ clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
+ ]])
+ feed(':<CR>')
+ screen:expect([[
+ ^a |
+ {0:~ }|
+ {0:~ }|
+ : |
+ ]])
+ feed('p')
+ screen:expect([[
+ a^a |
+ {0:~ }|
+ {0:~ }|
+ : |
+ ]])
+ end)
+
+ it('`:redir @+>` with invalid g:clipboard shows exactly one error #7184', function()
command("let g:clipboard = 'bogus'")
feed_command('redir @+> | :silent echo system("cat CONTRIBUTING.md") | redir END')
screen:expect([[
@@ -118,8 +163,7 @@ describe('clipboard', function()
]])
end)
- it('`:redir @+>|bogus_cmd|redir END` + invalid g:clipboard must not recurse #7184',
- function()
+ it('`:redir @+>|bogus_cmd|redir END` + invalid g:clipboard must not recurse #7184', function()
command("let g:clipboard = 'bogus'")
feed_command('redir @+> | bogus_cmd | redir END')
screen:expect{grid=[[
@@ -310,18 +354,18 @@ describe('clipboard (with fake clipboard.vim)', function()
insert([[
text:
first line
- secound line
+ second line
third line]])
feed('G"+dd"*dddd"+p"*pp')
expect([[
text:
third line
- secound line
+ second line
first line]])
-- linewise selection should be encoded as an extra newline
eq({{'third line', ''}, 'V'}, eval("g:test_clip['+']"))
- eq({{'secound line', ''}, 'V'}, eval("g:test_clip['*']"))
+ eq({{'second line', ''}, 'V'}, eval("g:test_clip['*']"))
end)
it('handles null bytes when pasting and in getreg', function()
@@ -477,7 +521,7 @@ describe('clipboard (with fake clipboard.vim)', function()
expect("indeed star")
end)
- it('unamed operations work even if the provider fails', function()
+ it('unnamed operations work even if the provider fails', function()
insert('the text')
feed('yy')
feed_command("let g:cliperror = 1")
@@ -511,7 +555,7 @@ describe('clipboard (with fake clipboard.vim)', function()
eq('textstar', meths.get_current_line())
end)
- it('Block paste works currectly', function()
+ it('Block paste works correctly', function()
insert([[
aabbcc
ddeeff
@@ -559,7 +603,7 @@ describe('clipboard (with fake clipboard.vim)', function()
eq({{'really unnamed', ''}, 'V'}, eval("g:test_clip['+']"))
eq({{'really unnamed', ''}, 'V'}, eval("g:test_clip['*']"))
- -- unnamedplus takes predecence when pasting
+ -- unnamedplus takes precedence when pasting
eq('+', eval('v:register'))
feed_command("let g:test_clip['+'] = ['the plus','']")
feed_command("let g:test_clip['*'] = ['the star','']")
diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua
index aff5e36e24..ce92831f4c 100644
--- a/test/functional/provider/perl_spec.lua
+++ b/test/functional/provider/perl_spec.lua
@@ -9,6 +9,8 @@ local curbufmeths = helpers.curbufmeths
local insert = helpers.insert
local expect = helpers.expect
local feed = helpers.feed
+local is_os = helpers.is_os
+local skip = helpers.skip
do
clear()
@@ -24,7 +26,7 @@ before_each(function()
end)
describe('legacy perl provider', function()
- if helpers.pending_win32(pending) then return end
+ skip(is_os('win'))
it('feature test', function()
eq(1, eval('has("perl")'))
@@ -68,7 +70,7 @@ describe('legacy perl provider', function()
end)
describe('perl provider', function()
- if helpers.pending_win32(pending) then return end
+ skip(is_os('win'))
teardown(function ()
os.remove('Xtest-perl-hello.pl')
os.remove('Xtest-perl-hello-plugin.pl')