aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/window_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-06-10 12:01:12 +0200
committerGitHub <noreply@github.com>2021-06-10 12:01:12 +0200
commit988f88c24e83c37e1dc011e3561fb505ca7b8706 (patch)
treef470e41459348fca9c25f42540acc88ab65399c1 /test/functional/api/window_spec.lua
parent21645e603cbc7003898315d753a0f3f7c867f68a (diff)
parent7b519cd11cee564813067a818c11fbc7a29e08c3 (diff)
downloadrneovim-988f88c24e83c37e1dc011e3561fb505ca7b8706.tar.gz
rneovim-988f88c24e83c37e1dc011e3561fb505ca7b8706.tar.bz2
rneovim-988f88c24e83c37e1dc011e3561fb505ca7b8706.zip
Merge pull request #14249 from euclidianAce/euclidianAce/win-config-include-border
include 'border' in nvim_win_get_config
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r--test/functional/api/window_spec.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index a57826f7e7..bb72b63b6c 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -401,4 +401,36 @@ describe('API/win', function()
eq(1, funcs.exists('g:fired'))
end)
end)
+
+ describe('get_config', 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,
+ })
+
+ local cfg = meths.win_get_config(win)
+ eq(b, cfg.border)
+ end)
+ it('includes border with highlight group', function()
+ local b = {
+ {'a', 'Normal'},
+ {'b', 'Special'},
+ {'c', 'String'},
+ {'d', 'Comment'},
+ {'e', 'Visual'},
+ {'f', 'Error'},
+ {'g', 'Constant'},
+ {'h', 'PreProc'},
+ }
+ local win = meths.open_win(0, true, {
+ relative='win', row=3, col=3, width=12, height=3,
+ border = b,
+ })
+
+ local cfg = meths.win_get_config(win)
+ eq(b, cfg.border)
+ end)
+ end)
end)