mirror of
https://github.com/neovim/neovim.git
synced 2026-05-03 20:45:02 +00:00
test: improve editor/fold_spec.lua and editor/put_spec.lua (#22916)
- Close and open a new window each time so that window options have their default values in each test. - Change feed_command() to command() as the latter is faster.
This commit is contained in:
@@ -4,7 +4,6 @@ local clear, feed, eq = helpers.clear, helpers.feed, helpers.eq
|
||||
local command = helpers.command
|
||||
local feed_command = helpers.feed_command
|
||||
local insert = helpers.insert
|
||||
local expect = helpers.expect
|
||||
local funcs = helpers.funcs
|
||||
local meths = helpers.meths
|
||||
local exec = helpers.exec
|
||||
@@ -2023,29 +2022,4 @@ describe("folded lines", function()
|
||||
describe('without ext_multigrid', function()
|
||||
with_ext_multigrid(false)
|
||||
end)
|
||||
|
||||
it('no folds remains if :delete makes buffer empty #19671', function()
|
||||
funcs.setline(1, {'foo', 'bar', 'baz'})
|
||||
command('2,3fold')
|
||||
command('%delete')
|
||||
eq(0, funcs.foldlevel(1))
|
||||
end)
|
||||
|
||||
it('multibyte fold markers work #20438', function()
|
||||
exec([[
|
||||
setlocal foldmethod=marker
|
||||
setlocal foldmarker=«,»
|
||||
setlocal commentstring=/*%s*/
|
||||
]])
|
||||
insert([[
|
||||
bbbbb
|
||||
bbbbb
|
||||
bbbbb]])
|
||||
feed('zfgg')
|
||||
expect([[
|
||||
bbbbb/*«*/
|
||||
bbbbb
|
||||
bbbbb/*»*/]])
|
||||
eq(1, funcs.foldlevel(1))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user