aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/tui_spec.lua
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2025-01-14 08:18:59 -0600
committerGitHub <noreply@github.com>2025-01-14 08:18:59 -0600
commitf1c45fc7a4a595e460cd245172a5767bddeb09e9 (patch)
treebf9dd2ffe6acea41c7639828fffef9a8393015fe /test/functional/terminal/tui_spec.lua
parent7eabc8899af8b2fed1472165b74f43965282974f (diff)
downloadrneovim-f1c45fc7a4a595e460cd245172a5767bddeb09e9.tar.gz
rneovim-f1c45fc7a4a595e460cd245172a5767bddeb09e9.tar.bz2
rneovim-f1c45fc7a4a595e460cd245172a5767bddeb09e9.zip
feat(terminal): support theme update notifications (DEC mode 2031) (#31999)
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r--test/functional/terminal/tui_spec.lua26
1 files changed, 26 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