local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear, feed = helpers.clear, helpers.feed
local eval = helpers.eval
local eq = helpers.eq
local command = helpers.command
local set_method_error = helpers.set_method_error
local meths = helpers.meths
local async_meths = helpers.async_meths
local test_build_dir = helpers.test_build_dir
local nvim_prog = helpers.nvim_prog
local iswin = helpers.iswin
local exc_exec = helpers.exc_exec
local exec_lua = helpers.exec_lua
describe('ui/ext_messages', function()
local screen
before_each(function()
clear()
screen = Screen.new(25, 5)
screen:attach({rgb=true, ext_messages=true, ext_popupmenu=true})
screen:set_default_attr_ids({
[1] = {bold = true, foreground = Screen.colors.Blue1},
[2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
[3] = {bold = true},
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
[5] = {foreground = Screen.colors.Blue1},
[6] = {bold = true, reverse = true},
[7] = {background = Screen.colors.Yellow},
[8] = {foreground = Screen.colors.Red},
})
end)
after_each(function()
os.remove('Xtest')
end)
it('msg_clear follows msg_show kind of confirm', function()
feed('iline 1<esc>')
feed(':call confirm("test")<cr>')
screen:expect{grid=[[
line ^1 |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
]], messages={ {
content = {{"\ntest\n[O]k: ", 4}},
kind = 'confirm',
}}}
feed('<cr>')
screen:expect{grid=[[
line ^1 |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
]]}
end)
it('msg_show kind=confirm,confirm_sub,emsg,wmsg,quickfix', function()
feed('iline 1\nline 2<esc>')
|