mirror of
https://github.com/neovim/neovim.git
synced 2025-12-04 21:52:41 +00:00
tests/ui: cleanup illegitimate usages of "attr_ignore"
"attr_ignore" is an anti-pattern, with snapshot_util() just include all the highlights already.
This commit is contained in:
@@ -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([[
|
||||
|
||||
Reference in New Issue
Block a user