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

@@ -188,15 +188,15 @@ describe('ui/cursor', function()
-- Event is published ONLY if the cursor style changed.
screen._mode_info = nil
command("echo 'test'")
screen:expect([[
screen:expect{grid=[[
^ |
~ |
~ |
~ |
test |
]], nil, nil, function()
]], condition=function()
eq(nil, screen._mode_info)
end)
end}
-- Change the cursor style.
helpers.command('hi Cursor guibg=DarkGray')