aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/embed_spec.lua
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/ui/embed_spec.lua
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/ui/embed_spec.lua')
-rw-r--r--test/functional/ui/embed_spec.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/functional/ui/embed_spec.lua b/test/functional/ui/embed_spec.lua
index 0445476780..77eae3627d 100644
--- a/test/functional/ui/embed_spec.lua
+++ b/test/functional/ui/embed_spec.lua
@@ -13,6 +13,10 @@ local fn = helpers.fn
local nvim_prog = helpers.nvim_prog
local retry = helpers.retry
local write_file = helpers.write_file
+local assert_log = helpers.assert_log
+local is_os = helpers.is_os
+
+local testlog = 'Xtest-embed-log'
local function test_embed(ext_linegrid)
local screen
@@ -93,13 +97,17 @@ describe('--embed UI on startup (ext_linegrid=false)', function()
end)
describe('--embed UI', function()
+ after_each(function()
+ os.remove(testlog)
+ end)
+
it('can pass stdin', function()
local pipe = assert(uv.pipe())
local writer = assert(uv.new_pipe(false))
writer:open(pipe.write)
- clear { args_rm = { '--headless' }, io_extra = pipe.read }
+ clear { args_rm = { '--headless' }, io_extra = pipe.read, env = { NVIM_LOG_FILE = testlog } }
-- attach immediately after startup, for early UI
local screen = Screen.new(40, 8)
@@ -131,6 +139,10 @@ describe('--embed UI', function()
{1:~ }|*4
{2:-- INSERT --} |
]]
+
+ if not is_os('win') then
+ assert_log('Failed to get flags on descriptor 3: Bad file descriptor', testlog)
+ end
end)
it('can pass stdin to -q - #17523', function()