From 8021c5a5311a322fec12b4b188ad96d8465ea94c Mon Sep 17 00:00:00 2001 From: Corey Williamson Date: Mon, 19 Apr 2021 18:47:42 -0500 Subject: api: include border in nvim_win_get_config --- test/functional/api/window_spec.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'test/functional/api') 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) -- cgit