aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-06-14 06:20:42 +0800
committerGitHub <noreply@github.com>2024-06-14 06:20:42 +0800
commit5def8714ad70e71e07773960269fff5c0c95e7ab (patch)
treeff97b539acbaccd538c0269b46e322e7d55632dc /test/functional
parent4a2494098025c9e9b3aa205bdc2d357315831dc3 (diff)
downloadrneovim-5def8714ad70e71e07773960269fff5c0c95e7ab.tar.gz
rneovim-5def8714ad70e71e07773960269fff5c0c95e7ab.tar.bz2
rneovim-5def8714ad70e71e07773960269fff5c0c95e7ab.zip
fix(terminal): set local values of window options (#29326)
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/terminal/buffer_spec.lua2
-rw-r--r--test/functional/terminal/window_spec.lua20
2 files changed, 21 insertions, 1 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 4ad0862986..365a4f8035 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -196,7 +196,7 @@ describe(':terminal buffer', function()
screen:expect([[
ab^c |
{4:~ }|
- {17:========== }|
+ {5:========== }|
rows: 2, cols: 50 |
{2: } |
{18:========== }|
diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua
index f85e26a66d..118ca266dd 100644
--- a/test/functional/terminal/window_spec.lua
+++ b/test/functional/terminal/window_spec.lua
@@ -13,6 +13,26 @@ local skip = t.skip
local is_os = t.is_os
describe(':terminal window', function()
+ before_each(clear)
+
+ it('sets local values of window options #29325', function()
+ command('setglobal wrap list')
+ command('terminal')
+ eq({ 0, 0, 1 }, eval('[&l:wrap, &wrap, &g:wrap]'))
+ eq({ 0, 0, 1 }, eval('[&l:list, &list, &g:list]'))
+ command('enew')
+ eq({ 1, 1, 1 }, eval('[&l:wrap, &wrap, &g:wrap]'))
+ eq({ 1, 1, 1 }, eval('[&l:list, &list, &g:list]'))
+ command('buffer #')
+ eq({ 0, 0, 1 }, eval('[&l:wrap, &wrap, &g:wrap]'))
+ eq({ 0, 0, 1 }, eval('[&l:list, &list, &g:list]'))
+ command('new')
+ eq({ 1, 1, 1 }, eval('[&l:wrap, &wrap, &g:wrap]'))
+ eq({ 1, 1, 1 }, eval('[&l:list, &list, &g:list]'))
+ end)
+end)
+
+describe(':terminal window', function()
local screen
before_each(function()