test: silence expected errors

This will remove unrelated errors in .nvimlog at the end of test output.
This commit is contained in:
dundargoc
2023-09-24 21:19:01 +02:00
committed by dundargoc
parent 6cfca21bac
commit ffe3002568
8 changed files with 66 additions and 6 deletions

View File

@@ -33,6 +33,8 @@ local tbl_map = vim.tbl_map
local tbl_filter = vim.tbl_filter
local endswith = vim.endswith
local testlog = 'Xtest-startupspec-log'
describe('startup', function()
it('--clean', function()
clear()
@@ -121,6 +123,10 @@ end)
describe('startup', function()
before_each(clear)
after_each(function()
os.remove(testlog)
end)
describe('-l Lua', function()
local function assert_l_out(expected, nvim_args, lua_args, script, input)
local args = { nvim_prog }
@@ -371,6 +377,7 @@ describe('startup', function()
end)
it('output to pipe: has("ttyin")==1 has("ttyout")==0', function()
clear({ env = { NVIM_LOG_FILE = testlog } })
if is_os('win') then
command([[set shellcmdflag=/s\ /c shellxquote=\"]])
end
@@ -398,9 +405,13 @@ describe('startup', function()
read_file('Xtest_startup_ttyout')
)
end)
if is_os('win') then
assert_log('stream write failed. RPC canceled; closing channel', testlog)
end
end)
it('input from pipe: has("ttyin")==0 has("ttyout")==1', function()
clear({ env = { NVIM_LOG_FILE = testlog } })
if is_os('win') then
command([[set shellcmdflag=/s\ /c shellxquote=\"]])
end
@@ -429,9 +440,13 @@ describe('startup', function()
read_file('Xtest_startup_ttyout')
)
end)
if is_os('win') then
assert_log('stream write failed. RPC canceled; closing channel', testlog)
end
end)
it('input from pipe (implicit) #7679', function()
clear({ env = { NVIM_LOG_FILE = testlog } })
local screen = Screen.new(25, 4)
screen:attach()
screen._default_attr_ids = nil
@@ -457,6 +472,9 @@ describe('startup', function()
0 1 |
|
]])
if not is_os('win') then
assert_log('Failed to get flags on descriptor 3: Bad file descriptor', testlog)
end
end)
it('input from pipe + file args #7679', function()