diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-22 17:56:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-22 17:56:05 +0800 |
commit | b7763d7f6b7fdcabe06658c664457df8bc147563 (patch) | |
tree | b85dad8a556924e09c4c4fa549e171ea634f1a75 /test/functional/api/window_spec.lua | |
parent | 64e8a3c4d19eab40888fbac36b96e97bd9d68c42 (diff) | |
download | rneovim-b7763d7f6b7fdcabe06658c664457df8bc147563.tar.gz rneovim-b7763d7f6b7fdcabe06658c664457df8bc147563.tar.bz2 rneovim-b7763d7f6b7fdcabe06658c664457df8bc147563.zip |
fix(api): get virtual text with multiple hl properly (#25307)
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r-- | test/functional/api/window_spec.lua | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 44d4470337..6737c2d15b 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -895,13 +895,14 @@ describe('API/win', function() it('includes border', function() local b = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' } local win = meths.open_win(0, true, { - relative='win', row=3, col=3, width=12, height=3, - border = b, + relative='win', row=3, col=3, width=12, height=3, + border = b, }) local cfg = meths.win_get_config(win) eq(b, cfg.border) end) + it('includes border with highlight group', function() local b = { {'a', 'Normal'}, @@ -914,12 +915,25 @@ describe('API/win', function() {'h', 'PreProc'}, } local win = meths.open_win(0, true, { - relative='win', row=3, col=3, width=12, height=3, - border = b, + relative='win', row=3, col=3, width=12, height=3, + border = b, }) local cfg = meths.win_get_config(win) eq(b, cfg.border) end) + + it('includes title and footer', function() + local title = { {'A', {'StatusLine', 'TabLine'}}, {'B'}, {'C', 'WinBar'} } + local footer = { {'A', 'WinBar'}, {'B'}, {'C', {'StatusLine', 'TabLine'}} } + local win = meths.open_win(0, true, { + relative='win', row=3, col=3, width=12, height=3, + border = 'single', title = title, footer = footer, + }) + + local cfg = meths.win_get_config(win) + eq(title, cfg.title) + eq(footer, cfg.footer) + end) end) end) |