mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 00:22:41 +00:00
refactor(tests): use global defaults instead of set_default_attr_ids (2)
This commit is contained in:
@@ -16,14 +16,6 @@ describe('tabline', function()
|
||||
|
||||
-- oldtest: Test_tabline_showcmd()
|
||||
it('showcmdloc=tabline works', function()
|
||||
screen:set_default_attr_ids({
|
||||
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
|
||||
[1] = { background = Screen.colors.LightGrey, foreground = Screen.colors.Black }, -- Visual
|
||||
[2] = { bold = true }, -- MoreMsg, TabLineSel
|
||||
[3] = { reverse = true }, -- TabLineFill
|
||||
[4] = { background = Screen.colors.LightGrey, underline = true }, -- TabLine
|
||||
[5] = { background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue }, -- Folded
|
||||
})
|
||||
exec([[
|
||||
func MyTabLine()
|
||||
return '%S'
|
||||
@@ -41,41 +33,41 @@ describe('tabline', function()
|
||||
|
||||
feed('g')
|
||||
screen:expect([[
|
||||
{3:g }|
|
||||
{5:+-- 2 lines: a···································}|
|
||||
{2:g }|
|
||||
{13:+-- 2 lines: a···································}|
|
||||
^c |
|
||||
{0:~ }|*3
|
||||
{1:~ }|*3
|
||||
|
|
||||
]])
|
||||
|
||||
-- typing "gg" should open the fold
|
||||
feed('g')
|
||||
screen:expect([[
|
||||
{3: }|
|
||||
{2: }|
|
||||
^a |
|
||||
b |
|
||||
c |
|
||||
{0:~ }|*2
|
||||
{1:~ }|*2
|
||||
|
|
||||
]])
|
||||
|
||||
feed('<C-V>Gl')
|
||||
screen:expect([[
|
||||
{3:3x2 }|
|
||||
{1:a} |
|
||||
{1:b} |
|
||||
{1:c}^ |
|
||||
{0:~ }|*2
|
||||
{2:-- VISUAL BLOCK --} |
|
||||
{2:3x2 }|
|
||||
{17:a} |
|
||||
{17:b} |
|
||||
{17:c}^ |
|
||||
{1:~ }|*2
|
||||
{5:-- VISUAL BLOCK --} |
|
||||
]])
|
||||
|
||||
feed('<Esc>1234')
|
||||
screen:expect([[
|
||||
{3:1234 }|
|
||||
{2:1234 }|
|
||||
a |
|
||||
b |
|
||||
^c |
|
||||
{0:~ }|*2
|
||||
{1:~ }|*2
|
||||
|
|
||||
]])
|
||||
|
||||
@@ -83,11 +75,11 @@ describe('tabline', function()
|
||||
feed(':<CR>')
|
||||
feed('1234')
|
||||
screen:expect([[
|
||||
{2: + [No Name] }{3: }{4:1234}{3: }|
|
||||
{5: + [No Name] }{2: }{24:1234}{2: }|
|
||||
a |
|
||||
b |
|
||||
^c |
|
||||
{0:~ }|*2
|
||||
{1:~ }|*2
|
||||
: |
|
||||
]])
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user