aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/terminal/tui_spec.lua26
-rw-r--r--test/unit/fixtures/vterm_test.c2
2 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 3624a7bc2b..0a7dca8e6e 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -3309,6 +3309,32 @@ describe('TUI bg color', function()
{3:-- TERMINAL --} |
]])
end)
+
+ it('sends theme update notifications when background changes #31652', function()
+ command('set background=dark') -- set outer Nvim background
+ local child_server = new_pipename()
+ local screen = tt.setup_child_nvim({
+ '--listen',
+ child_server,
+ '-u',
+ 'NONE',
+ '-i',
+ 'NONE',
+ '--cmd',
+ 'colorscheme vim',
+ '--cmd',
+ 'set noswapfile',
+ })
+ screen:expect({ any = '%[No Name%]' })
+ local child_session = n.connect(child_server)
+ retry(nil, nil, function()
+ eq({ true, 'dark' }, { child_session:request('nvim_eval', '&background') })
+ end)
+ command('set background=light') -- set outer Nvim background
+ retry(nil, nil, function()
+ eq({ true, 'light' }, { child_session:request('nvim_eval', '&background') })
+ end)
+ end)
end)
-- These tests require `tt` because --headless/--embed
diff --git a/test/unit/fixtures/vterm_test.c b/test/unit/fixtures/vterm_test.c
index 7522962a05..6744305960 100644
--- a/test/unit/fixtures/vterm_test.c
+++ b/test/unit/fixtures/vterm_test.c
@@ -345,6 +345,8 @@ static VTermValueType vterm_get_prop_type(VTermProp prop)
return VTERM_VALUETYPE_INT;
case VTERM_PROP_FOCUSREPORT:
return VTERM_VALUETYPE_BOOL;
+ case VTERM_PROP_THEMEUPDATES:
+ return VTERM_VALUETYPE_BOOL;
case VTERM_N_PROPS:
return 0;