aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/float_spec.lua43
-rw-r--r--test/functional/ui/screen.lua4
-rw-r--r--test/functional/ui/searchhl_spec.lua11
3 files changed, 54 insertions, 4 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
index 32f9ae030f..8d654f6e5b 100644
--- a/test/functional/ui/float_spec.lua
+++ b/test/functional/ui/float_spec.lua
@@ -5344,6 +5344,45 @@ describe('floatwin', function()
-- at least. Also check invisible EndOfBuffer region blends correctly.
meths.buf_set_lines(buf, 0, -1, true, {" x x x xx", " x x x x"})
win = meths.open_win(buf, false, {relative='editor', width=12, height=3, row=0, col=11, style='minimal'})
+ if multigrid then
+ screen:expect{grid=[[
+ ## grid 1
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [3:----------------------------------------]|
+ ## grid 2
+ # TODO: 测试字典信息的准确性 |
+ # FIXME: 测试字典信息的准确^性 |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ ## grid 3
+ |
+ ## grid 6
+ {1: x x x xx}|
+ {1: x x x x}|
+ {1: }|
+ ]], float_pos={
+ [6] = { {
+ id = 1003
+ }, "NW", 1, 0, 11, true }
+ }}
+ else
+ screen:expect{grid=[[
+ # TODO: 测 {1: x x x xx} 确性 |
+ # FIXME: 测{1: x x x x}准确^性 |
+ {0:~ }{1: }{0: }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ |
+ ]]}
+ end
meths.win_set_option(win, 'winblend', 30)
screen:set_default_attr_ids({
[1] = {foreground = tonumber('0xb282b2'), background = tonumber('0xffcfff')},
@@ -5381,7 +5420,7 @@ describe('floatwin', function()
}, "NW", 1, 0, 11, true }
}}
else
- screen:expect([[
+ screen:expect{grid=[[
# TODO: 测 {2: x x x}{1:息}{2: xx} 确性 |
# FIXME: 测{1:试}{2:x x x}{1:息}{2: x}准确^性 |
{3:~ }{4: }{3: }|
@@ -5389,7 +5428,7 @@ describe('floatwin', function()
{3:~ }|
{3:~ }|
|
- ]])
+ ]]}
end
meths.win_set_config(win, {relative='editor', row=0, col=12})
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 8fa9fcc42f..5104c58796 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -807,7 +807,9 @@ function Screen:_handle_mouse_off()
end
function Screen:_handle_mode_change(mode, idx)
- assert(mode == self._mode_info[idx+1].name)
+ if self._mode_info ~= nil then
+ assert(mode == self._mode_info[idx+1].name)
+ end
self.mode = mode
end
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 222275eb4d..885fe7d4c9 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -20,6 +20,7 @@ describe('search highlighting', function()
[2] = {background = colors.Yellow}, -- Search
[3] = {reverse = true},
[4] = {foreground = colors.Red}, -- Message
+ [5] = {bold = true, reverse = true},
})
end)
@@ -159,7 +160,15 @@ describe('search highlighting', function()
]])
feed('/foo')
helpers.poke_eventloop()
- screen:expect_unchanged()
+ screen:expect{grid=[[
+ {3:foo} bar baz {3:│} |
+ bar baz {2:foo} {3:│} |
+ bar {2:foo} baz {3:│} |
+ {3:│} |
+ {1:~ }{3:│} |
+ {5:[No Name] [+] }{3:term }|
+ /foo^ |
+ ]]}
end)
it('works with incsearch', function()