tests: introduce screen:expect{...} form

This commit is contained in:
Björn Linse
2018-08-20 18:51:25 +02:00
parent 03978a0f29
commit 3d88287e30
17 changed files with 600 additions and 674 deletions

View File

@@ -28,27 +28,27 @@ describe('ui/ext_tabline', function()
{tab = { id = 1 }, name = '[No Name]'},
{tab = { id = 2 }, name = 'another-tab'},
}
screen:expect([[
screen:expect{grid=[[
^ |
~ |
~ |
~ |
|
]], nil, nil, function()
]], condition=function()
eq({ id = 2 }, event_curtab)
eq(expected_tabs, event_tabs)
end)
end}
command("tabNext")
screen:expect([[
screen:expect{grid=[[
^ |
~ |
~ |
~ |
|
]], nil, nil, function()
]], condition=function()
eq({ id = 1 }, event_curtab)
eq(expected_tabs, event_tabs)
end)
end}
end)
end)