aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/tui_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-02-23 18:29:36 +0100
committerJustin M. Keyes <justinkz@gmail.com>2023-02-27 19:50:59 +0100
commit7f424e2b65779c59fc0cac3cc7508ba2ec07f200 (patch)
tree60c2609c51ea9f5708c379972c38d7da32a6faa1 /test/functional/terminal/tui_spec.lua
parentf64098a2df774c79dd454f63ac491570cdcaf2b2 (diff)
downloadrneovim-7f424e2b65779c59fc0cac3cc7508ba2ec07f200.tar.gz
rneovim-7f424e2b65779c59fc0cac3cc7508ba2ec07f200.tar.bz2
rneovim-7f424e2b65779c59fc0cac3cc7508ba2ec07f200.zip
feat(api): more fields in nvim_list_uis
Problem: nvim_list_uis does not report all ":help ui-option" fields. Solution: Store ":help ui-option" fields on the `UI` object and update ui_array.
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r--test/functional/terminal/tui_spec.lua37
1 files changed, 26 insertions, 11 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 792ad63e76..9db80e0db2 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -1398,17 +1398,32 @@ describe('TUI', function()
]]}
end)
- it('is included in nvim_list_uis()', function()
- feed_data(':echo map(nvim_list_uis(), {k,v -> sort(items(filter(v, {k,v -> k[:3] !=# "ext_" })))})\r')
- screen:expect([=[
- |
- {4:~ }|
- {5: }|
- [[['chan', 1], ['height', 6], ['override', v:false|
- ], ['rgb', v:false], ['width', 50]]] |
- {10:Press ENTER or type command to continue}{1: } |
- {3:-- TERMINAL --} |
- ]=])
+ it('in nvim_list_uis()', function()
+ local expected = {
+ {
+ chan = 1,
+ ext_cmdline = false,
+ ext_hlstate = false,
+ ext_linegrid = true,
+ ext_messages = false,
+ ext_multigrid = false,
+ ext_popupmenu = false,
+ ext_tabline = false,
+ ext_termcolors = true,
+ ext_wildmenu = false,
+ height = 6,
+ override = false,
+ rgb = false,
+ stdin_tty = true,
+ stdout_tty = true,
+ term_background = '',
+ term_colors = 256,
+ term_name = 'xterm-256color', -- $TERM in :terminal.
+ width = 50
+ },
+ }
+ local _, rv = child_session:request('nvim_list_uis')
+ eq(expected, rv)
end)
it('allows grid to assume wider ambiguous-width characters than host terminal #19686', function()