aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-11-21 22:21:32 -0500
committerGitHub <noreply@github.com>2021-11-21 22:21:32 -0500
commit64abd7be7993ed3fa031b5d71a4482871108093a (patch)
tree447c4e3066a20c50b5fc060c6e9236045f3669b0 /test/functional/options
parente05db65d2ae3bb3c57e009e67ffc85794835a4e2 (diff)
parent145fc69df9f173717e3138c0a07a8de1a243519a (diff)
downloadrneovim-nightly.tar.gz
rneovim-nightly.tar.bz2
rneovim-nightly.zip
Merge pull request #16341 from zeertzjq/vim-8.2.2518nightly
vim-patch:8.2.{2518,2520,3572,3588}: 'listchars' (and 'fillchars'?) fixes
Diffstat (limited to 'test/functional/options')
-rw-r--r--test/functional/options/chars_spec.lua92
1 files changed, 61 insertions, 31 deletions
diff --git a/test/functional/options/chars_spec.lua b/test/functional/options/chars_spec.lua
index 5439ca3dba..a082204980 100644
--- a/test/functional/options/chars_spec.lua
+++ b/test/functional/options/chars_spec.lua
@@ -67,36 +67,52 @@ describe("'fillchars'", function()
shouldfail('eob:xy') -- two ascii chars
shouldfail('eob:\255', 'eob:<ff>') -- invalid UTF-8
end)
- it('has global value', function()
- screen:try_resize(50, 5)
- insert("foo\nbar")
- command('set laststatus=0')
- command('1,2fold')
- command('vsplit')
- command('set fillchars=fold:x')
- screen:expect([[
- ^+-- 2 lines: fooxxxxxxxx│+-- 2 lines: fooxxxxxxx|
- ~ │~ |
- ~ │~ |
- ~ │~ |
- |
- ]])
- end)
- it('has local window value', function()
- screen:try_resize(50, 5)
- insert("foo\nbar")
- command('set laststatus=0')
- command('1,2fold')
- command('vsplit')
- command('setl fillchars=fold:x')
- screen:expect([[
- ^+-- 2 lines: fooxxxxxxxx│+-- 2 lines: foo·······|
- ~ │~ |
- ~ │~ |
- ~ │~ |
- |
- ]])
- end)
+ end)
+ it('has global value', function()
+ screen:try_resize(50, 5)
+ insert("foo\nbar")
+ command('set laststatus=0')
+ command('1,2fold')
+ command('vsplit')
+ command('set fillchars=fold:x')
+ screen:expect([[
+ ^+-- 2 lines: fooxxxxxxxx│+-- 2 lines: fooxxxxxxx|
+ ~ │~ |
+ ~ │~ |
+ ~ │~ |
+ |
+ ]])
+ end)
+ it('has window-local value', function()
+ screen:try_resize(50, 5)
+ insert("foo\nbar")
+ command('set laststatus=0')
+ command('1,2fold')
+ command('vsplit')
+ command('setl fillchars=fold:x')
+ screen:expect([[
+ ^+-- 2 lines: fooxxxxxxxx│+-- 2 lines: foo·······|
+ ~ │~ |
+ ~ │~ |
+ ~ │~ |
+ |
+ ]])
+ end)
+ it('using :set clears window-local value', function()
+ screen:try_resize(50, 5)
+ insert("foo\nbar")
+ command('set laststatus=0')
+ command('setl fillchars=fold:x')
+ command('1,2fold')
+ command('vsplit')
+ command('set fillchars&')
+ screen:expect([[
+ ^+-- 2 lines: foo········│+-- 2 lines: fooxxxxxxx|
+ ~ │~ |
+ ~ │~ |
+ ~ │~ |
+ |
+ ]])
end)
end)
@@ -122,7 +138,7 @@ describe("'listchars'", function()
|
]])
end)
- it('has value local to window', function()
+ it('has window-local value', function()
feed('i<tab><tab><tab><esc>')
command('set list laststatus=0')
command('setl listchars=tab:<->')
@@ -136,4 +152,18 @@ describe("'listchars'", function()
|
]])
end)
+ it('using :set clears window-local value', function()
+ feed('i<tab><tab><tab><esc>')
+ command('set list laststatus=0')
+ command('setl listchars=tab:<->')
+ command('vsplit')
+ command('set listchars=tab:>-,eol:$')
+ screen:expect([[
+ >------->-------^>-------$│<------><------><------>|
+ ~ │~ |
+ ~ │~ |
+ ~ │~ |
+ |
+ ]])
+ end)
end)