mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
refactor(tutor): cleanup
This commit is contained in:
parent
bc6fc0123d
commit
de93489789
@ -6,13 +6,25 @@ local feed = helpers.feed
|
||||
local is_os = helpers.is_os
|
||||
|
||||
describe(':Tutor', function()
|
||||
local screen
|
||||
|
||||
before_each(function()
|
||||
clear({ args = { '-u', 'NORC' } })
|
||||
clear({ args = { '--clean' } })
|
||||
command('set cmdheight=0')
|
||||
command('Tutor')
|
||||
screen = Screen.new(80, 30)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.Gray },
|
||||
[1] = { bold = true },
|
||||
[2] = { underline = true, foreground = tonumber('0x0088ff') },
|
||||
[3] = { foreground = Screen.colors.SlateBlue },
|
||||
[4] = { bold = true, foreground = Screen.colors.Brown },
|
||||
[5] = { bold = true, foreground = Screen.colors.Magenta1 },
|
||||
})
|
||||
screen:attach()
|
||||
end)
|
||||
|
||||
it('should apply transformation', function()
|
||||
it('applies {unix:…,win:…} transform', function()
|
||||
local expected = is_os('win') and [[
|
||||
{0: }^ |
|
||||
{0: } 3. To verify that a file was retrieved, cursor back and notice that there |
|
||||
@ -77,18 +89,7 @@ describe(':Tutor', function()
|
||||
{0: } |
|
||||
]]
|
||||
|
||||
local screen = Screen.new(80, 30)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = { foreground = Screen.colors.DarkBlue, background = Screen.colors.Gray },
|
||||
[1] = { bold = true },
|
||||
[2] = { underline = true, foreground = tonumber('0x0088ff') },
|
||||
[3] = { foreground = Screen.colors.SlateBlue },
|
||||
[4] = { bold = true, foreground = Screen.colors.Brown },
|
||||
[5] = { bold = true, foreground = Screen.colors.Magenta1 },
|
||||
})
|
||||
screen:attach()
|
||||
|
||||
feed(':700<CR>z<CR>')
|
||||
feed(':700<CR>zt')
|
||||
screen:expect(expected)
|
||||
end)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user