aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-09-24 21:19:01 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-04-02 17:07:44 +0200
commitffe3002568f849df1b155b90d6ea0e1f48d8c6d5 (patch)
tree8b4732fcbc9b9902f04b1c2b990f2cc7b2ac20a4 /test/functional/core
parent6cfca21bac6bb39b50cba1c23ffb2b69e2d94df8 (diff)
downloadrneovim-ffe3002568f849df1b155b90d6ea0e1f48d8c6d5.tar.gz
rneovim-ffe3002568f849df1b155b90d6ea0e1f48d8c6d5.tar.bz2
rneovim-ffe3002568f849df1b155b90d6ea0e1f48d8c6d5.zip
test: silence expected errors
This will remove unrelated errors in .nvimlog at the end of test output.
Diffstat (limited to 'test/functional/core')
-rw-r--r--test/functional/core/startup_spec.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua
index 2e6649d16a..adf29cbe7c 100644
--- a/test/functional/core/startup_spec.lua
+++ b/test/functional/core/startup_spec.lua
@@ -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()