fix(tests): use uv.spawn instead of io.popen for unittest helpers

The old implementation of repeated_read_cmd would attempt to run the
command multiple times to handle racyness of async output. Code
like this should not be written. Instead, use the libuv event
loop to read until the process has exited and the pipe has been closed.

This causes some previous discarded errors to be propagated. Fix these
as well.
This commit is contained in:
bfredl
2025-05-20 12:10:37 +02:00
parent 272e041780
commit c81af9428c
4 changed files with 40 additions and 31 deletions

View File

@@ -13,8 +13,11 @@ local int_type = t_eval.int_type
local flt_type = t_eval.flt_type
local type_key = t_eval.type_key
local api =
cimport('./src/nvim/api/private/defs.h', './src/nvim/api/private/t.h', './src/nvim/memory.h')
local api = cimport(
'./src/nvim/api/private/defs.h',
'./src/nvim/api/private/helpers.h',
'./src/nvim/memory.h'
)
local obj2lua