commit 9aa936d8929161cba360788c2f9d67b263c8d0b6
parent 4648d89d50bd617256837a0a917f316efc7c7182
Author: wjyoung65 <wjyoung65@gmail.com>
Date: Sat, 21 Feb 2026 15:00:06 -0500
test(ui): failure in lua/ui_spec.lua in headless OS (no GUI) #37975
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/test/functional/lua/ui_spec.lua b/test/functional/lua/ui_spec.lua
@@ -143,9 +143,14 @@ describe('vim.ui', function()
exec_lua [[vim.system = function() return { wait=function() return { code=3 } end } end]]
end
if not is_os('bsd') then
- local rv =
- exec_lua [[local cmd = vim.ui.open('non-existent-file'); return cmd:wait(100).code]]
- ok(type(rv) == 'number' and rv ~= 0, 'nonzero exit code', rv)
+ local rv = exec_lua([[
+ local cmd, err = vim.ui.open('non-existent-file')
+ if err then return nil end
+ return cmd:wait(100).code
+ ]])
+ if type(rv) == 'number' then
+ ok(rv ~= 0, 'nonzero exit code', rv)
+ end
end
exec_lua [[