diff options
author | Raphael <glephunter@gmail.com> | 2023-01-09 14:17:32 +0800 |
---|---|---|
committer | Raphael <glephunter@gmail.com> | 2023-01-09 14:17:32 +0800 |
commit | e351ab179b3f4dbedd8e959dfcd972178d6a9e16 (patch) | |
tree | aa6f4a3f2aa2c948a35fe2ff3048fd3edab5064d /test/functional/ui/float_spec.lua | |
parent | 1f18c27404f15a3344d6f2f3992e71b3efd0923c (diff) | |
download | rneovim-e351ab179b3f4dbedd8e959dfcd972178d6a9e16.tar.gz rneovim-e351ab179b3f4dbedd8e959dfcd972178d6a9e16.tar.bz2 rneovim-e351ab179b3f4dbedd8e959dfcd972178d6a9e16.zip |
fix(ui): add test case
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r-- | test/functional/ui/float_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index ab87384194..61143e953c 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -1739,6 +1739,28 @@ describe('float window', function() })) end) + it('validate title_pos in nvim_win_get_config', function() + local title_pos = exec_lua([[ + local bufnr = vim.api.nvim_create_buf(false, false) + local opts = { + relative = 'editor', + col = 2, + row = 5, + height = 2, + width = 9, + border = 'double', + title = 'Test', + title_pos = 'center' + } + + local win_id = vim.api.nvim_open_win(bufnr, true, opts) + return vim.api.nvim_win_get_config(win_id).title_pos + ]]) + + eq('center', title_pos) + end) + + it('border with title', function() local buf = meths.create_buf(false, false) meths.buf_set_lines(buf, 0, -1, true, {' halloj! ', |