mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
WinClosed: sort auevents.lua; improve tests
- test: reduce verbosity, condense redundancy, improve readability
- auevents.lua: keep events sorted by name. ref afd1d412fa
This commit is contained in:
@@ -597,6 +597,19 @@ function module.assert_alive()
|
||||
assert(2 == module.eval('1+1'), 'crash? request failed')
|
||||
end
|
||||
|
||||
-- Asserts that buffer is loaded and visible in the current tabpage.
|
||||
function module.assert_visible(bufnr, visible)
|
||||
assert(type(visible) == 'boolean')
|
||||
eq(visible, module.bufmeths.is_loaded(bufnr))
|
||||
if visible then
|
||||
assert(-1 ~= module.funcs.bufwinnr(bufnr),
|
||||
'expected buffer to be visible in current tabpage: '..tostring(bufnr))
|
||||
else
|
||||
assert(-1 == module.funcs.bufwinnr(bufnr),
|
||||
'expected buffer NOT visible in current tabpage: '..tostring(bufnr))
|
||||
end
|
||||
end
|
||||
|
||||
local function do_rmdir(path)
|
||||
local mode, errmsg, errcode = lfs.attributes(path, 'mode')
|
||||
if mode == nil then
|
||||
|
Reference in New Issue
Block a user