tests(indent): adapt scandir to nightly changes

Problem: `vim.fs.find` on Nvim 0.13 changed its return value to also
return errors (if any), which broke its use for building a list of files
in directories (since the empty error list got included).

Solution: Only capture first return value.
This commit is contained in:
Christian Clason 2026-07-12 13:20:12 +02:00 committed by Christian Clason
parent e778b6097d
commit 8dfe21ae82

View file

@ -182,9 +182,9 @@ function Runner:whole_file(dirs, opts)
return dir
end, dirs)
local scandir = function(dir)
return vim.fs.find(function()
return (vim.fs.find(function()
return true
end, { path = dir, limit = math.huge })
end, { path = dir, limit = math.huge }))
end
local files = vim.iter(dirs):map(scandir):flatten()
for _, file in files:enumerate() do