diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/api/window_spec.lua | 24 | ||||
-rw-r--r-- | test/functional/ui/float_spec.lua | 31 |
2 files changed, 43 insertions, 12 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 135b24fa5f..5ce93f9e04 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -1815,10 +1815,10 @@ describe('API/win', function() 'title/footer must be string or array', pcall_err(api.nvim_open_win, 0, false, { relative = 'editor', - row = 5, - col = 5, - height = 5, - width = 5, + row = 10, + col = 10, + height = 10, + width = 10, border = 'single', title = { { 'TITLE' } }, footer = 0, @@ -1831,10 +1831,10 @@ describe('API/win', function() 'title/footer must be string or array', pcall_err(api.nvim_open_win, 0, false, { relative = 'editor', - row = 5, - col = 5, - height = 5, - width = 5, + row = 10, + col = 10, + height = 10, + width = 10, border = 'single', title = 0, footer = { { 'FOOTER' } }, @@ -2840,10 +2840,10 @@ describe('API/win', function() before_each(function() win = api.nvim_open_win(0, false, { relative = 'editor', - row = 5, - col = 5, - height = 5, - width = 5, + row = 10, + col = 10, + height = 10, + width = 10, border = 'single', title = { { 'OLD_TITLE' } }, footer = { { 'OLD_FOOTER' } }, diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 52b46d0ecb..b2ed5f5a5f 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -2562,6 +2562,37 @@ describe('float window', function() end eq({{"🦄", ""}, {"BB", {"B0", "B1", ""}}}, api.nvim_win_get_config(win).title) eq({{"🦄", ""}, {"BB", {"B0", "B1", ""}}}, api.nvim_win_get_config(win).footer) + + -- making it a split should not leak memory + api.nvim_win_set_config(win, { vertical = true }) + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [4:--------------------]{5:│}[2:-------------------]|*5 + {5:[No Name] [+] }{4:[No Name] }| + [3:----------------------------------------]| + ## grid 2 + ^ | + {0:~ }|*4 + ## grid 3 + | + ## grid 4 + halloj! | + BORDAA | + {0:~ }|*3 + ]], win_viewport={ + [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; + [4] = {win = 1001, topline = 0, botline = 3, curline = 0, curcol = 0, linecount = 2, sum_scroll_delta = 0}; + }} + else + screen:expect{grid=[[ + halloj! {5:│}^ | + BORDAA {5:│}{0:~ }| + {0:~ }{5:│}{0:~ }|*3 + {5:[No Name] [+] }{4:[No Name] }| + | + ]]} + end end) it('terminates border on edge of viewport when window extends past viewport', function() |