aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options/chars_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-11-26 22:10:13 +0100
committerGitHub <noreply@github.com>2019-11-26 22:10:13 +0100
commit5f9209389b95c03f22c660e9f36d0158b0f664e3 (patch)
treee670fbeb5dd52a3841e82d1302689831b4ceb0e3 /test/functional/options/chars_spec.lua
parenta40ae96a38f0e99947421f81511ad2f7c2d3fc2c (diff)
parent49a40f425d88cbbac09fdf442c22f725bffc2249 (diff)
downloadrneovim-5f9209389b95c03f22c660e9f36d0158b0f664e3.tar.gz
rneovim-5f9209389b95c03f22c660e9f36d0158b0f664e3.tar.bz2
rneovim-5f9209389b95c03f22c660e9f36d0158b0f664e3.zip
Merge pull request #11445 from bfredl/fcslcs
options: make 'fillchars' and 'listchars' global-local instead of local-only
Diffstat (limited to 'test/functional/options/chars_spec.lua')
-rw-r--r--test/functional/options/chars_spec.lua42
1 files changed, 34 insertions, 8 deletions
diff --git a/test/functional/options/chars_spec.lua b/test/functional/options/chars_spec.lua
index 3453e79429..5439ca3dba 100644
--- a/test/functional/options/chars_spec.lua
+++ b/test/functional/options/chars_spec.lua
@@ -67,16 +67,29 @@ describe("'fillchars'", function()
shouldfail('eob:xy') -- two ascii chars
shouldfail('eob:\255', 'eob:<ff>') -- invalid UTF-8
end)
- it('is local to window', function()
- clear()
- screen = Screen.new(50, 5)
- screen:attach()
+ 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·······|
~ │~ |
~ │~ |
@@ -96,12 +109,25 @@ describe("'listchars'", function()
screen:attach()
end)
- it('is local to window', function()
+ it('has global value', function()
+ feed('i<tab><tab><tab><esc>')
+ command('set list laststatus=0')
+ command('vsplit')
+ command('set listchars=tab:<->')
+ screen:expect([[
+ <------><------>^<------> │<------><------><------>|
+ ~ │~ |
+ ~ │~ |
+ ~ │~ |
+ |
+ ]])
+ end)
+ it('has value local to window', function()
feed('i<tab><tab><tab><esc>')
- command('set laststatus=0')
- command('set list listchars=tab:<->')
+ command('set list laststatus=0')
+ command('setl listchars=tab:<->')
command('vsplit')
- command('set listchars&')
+ command('setl listchars<')
screen:expect([[
> > ^> │<------><------><------>|
~ │~ |