aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/clipboard_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-10-12 13:29:51 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-10-13 22:10:42 +0200
commita330129a280a34963e42d498f7cb1f53e6723e85 (patch)
treef296ab9e478df5641db4a5f09be669300dfae493 /test/functional/provider/clipboard_spec.lua
parent5a85699425661a1b508627843c40812d1d07fb2c (diff)
downloadrneovim-a330129a280a34963e42d498f7cb1f53e6723e85.tar.gz
rneovim-a330129a280a34963e42d498f7cb1f53e6723e85.tar.bz2
rneovim-a330129a280a34963e42d498f7cb1f53e6723e85.zip
tests/ui: cleanup illegitimate usages of "attr_ignore"
"attr_ignore" is an anti-pattern, with snapshot_util() just include all the highlights already.
Diffstat (limited to 'test/functional/provider/clipboard_spec.lua')
-rw-r--r--test/functional/provider/clipboard_spec.lua48
1 files changed, 30 insertions, 18 deletions
diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua
index b2d75db745..da9dd09129 100644
--- a/test/functional/provider/clipboard_spec.lua
+++ b/test/functional/provider/clipboard_spec.lua
@@ -88,6 +88,11 @@ describe('clipboard', function()
before_each(function()
clear()
screen = Screen.new(72, 4)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue},
+ [1] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
+ [2] = {bold = true, foreground = Screen.colors.SeaGreen4},
+ })
screen:attach()
command("set display-=msgsep")
end)
@@ -103,22 +108,22 @@ describe('clipboard', function()
feed_command('redir @+> | :silent echo system("cat CONTRIBUTING.md") | redir END')
screen:expect([[
^ |
- ~ |
- ~ |
+ {0:~ }|
+ {0:~ }|
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
- ]], nil, {{bold = true, foreground = Screen.colors.Blue}})
+ ]])
end)
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([[
- ~ |
+ screen:expect{grid=[[
+ {0:~ }|
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
- E492: Not an editor command: bogus_cmd | redir END |
- Press ENTER or type command to continue^ |
- ]], nil, {{bold = true, foreground = Screen.colors.Blue}})
+ {1:E492: Not an editor command: bogus_cmd | redir END} |
+ {2:Press ENTER or type command to continue}^ |
+ ]]}
end)
it('invalid g:clipboard shows hint if :redir is not active', function()
@@ -131,10 +136,10 @@ describe('clipboard', function()
feed_command('let @+="foo"')
screen:expect([[
^ |
- ~ |
- ~ |
+ {0:~ }|
+ {0:~ }|
clipboard: No provider. Try ":checkhealth" or ":h clipboard". |
- ]], nil, {{bold = true, foreground = Screen.colors.Blue}})
+ ]])
end)
it('valid g:clipboard', function()
@@ -266,13 +271,17 @@ describe('clipboard (with fake clipboard.vim)', function()
function()
local screen = Screen.new(72, 4)
screen:attach()
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue},
+ [1] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
+ })
feed_command('redir @+> | bogus_cmd | redir END')
screen:expect([[
^ |
- ~ |
- ~ |
- E492: Not an editor command: bogus_cmd | redir END |
- ]], nil, {{bold = true, foreground = Screen.colors.Blue}})
+ {0:~ }|
+ {0:~ }|
+ {1:E492: Not an editor command: bogus_cmd | redir END} |
+ ]])
end)
it('has independent "* and unnamed registers by default', function()
@@ -637,6 +646,9 @@ describe('clipboard (with fake clipboard.vim)', function()
feed_command('set mouse=a')
local screen = Screen.new(30, 5)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue},
+ })
screen:attach()
insert([[
the source
@@ -646,10 +658,10 @@ describe('clipboard (with fake clipboard.vim)', function()
screen:expect([[
the ^source |
a target |
- ~ |
- ~ |
+ {0:~ }|
+ {0:~ }|
|
- ]], nil, {{bold = true, foreground = Screen.colors.Blue}})
+ ]])
feed('<MiddleMouse><0,1>')
expect([[