test: Add basic tests for the TUI

The tests use `termopen` to spawn nvim and verify the TUI.
This commit is contained in:
Thiago de Arruda
2015-10-01 15:03:40 -03:00
parent 2182cd6081
commit 5d185c7772
3 changed files with 134 additions and 21 deletions

View File

@@ -163,6 +163,7 @@ function Screen.new(width, height)
height = 14
end
local self = setmetatable({
timeout = default_screen_timeout,
title = '',
icon = '',
bell = false,
@@ -248,7 +249,7 @@ function Screen:wait(check, timeout)
return true
end
run(nil, notification_cb, nil, timeout or default_screen_timeout)
run(nil, notification_cb, nil, timeout or self.timeout)
if not checked then
err = check()
end