aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-11-17 07:07:15 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-11-17 07:11:46 +0800
commit7528bcec42bddfb644561adde42b9ea764faffda (patch)
tree47307927d624908afc5e480daaf6ae2301614538 /test/functional
parent8c24e1462c567c30410d3a45e552ecffc95bbd1d (diff)
downloadrneovim-7528bcec42bddfb644561adde42b9ea764faffda.tar.gz
rneovim-7528bcec42bddfb644561adde42b9ea764faffda.tar.bz2
rneovim-7528bcec42bddfb644561adde42b9ea764faffda.zip
fix(options): using :set fillchars should clear local value
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/options/chars_spec.lua76
1 files changed, 46 insertions, 30 deletions
diff --git a/test/functional/options/chars_spec.lua b/test/functional/options/chars_spec.lua
index aa54b8a04a..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)