mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
test(indent): we have scan_dir at home
This commit is contained in:
parent
c9fea86a5a
commit
2cc172c28e
1 changed files with 7 additions and 3 deletions
|
|
@ -2,7 +2,6 @@ local M = {}
|
|||
|
||||
local assert = require('luassert')
|
||||
local say = require('say')
|
||||
local scan_dir = require('plenary.scandir').scan_dir
|
||||
|
||||
M.XFAIL = 'xfail'
|
||||
|
||||
|
|
@ -182,8 +181,13 @@ function Runner:whole_file(dirs, opts)
|
|||
assert.is.same(1, vim.fn.isdirectory(dir))
|
||||
return dir
|
||||
end, dirs)
|
||||
local files = vim.iter(vim.tbl_map(scan_dir, dirs)):flatten():totable()
|
||||
for _, file in ipairs(files) do
|
||||
local scandir = function(dir)
|
||||
return vim.fs.find(function()
|
||||
return true
|
||||
end, { path = dir, limit = math.huge })
|
||||
end
|
||||
local files = vim.iter(dirs):map(scandir):flatten()
|
||||
for _, file in files:enumerate() do
|
||||
self.it(file, function()
|
||||
M.indent_whole_file(file, self.buf_opts, vim.tbl_contains(expected_failures, file))
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue