Co-authored-by: Barrett Ruth <br@barrettruth.com>
Co-authored-by: Nathan Zeng <nathan.j.zeng@gmail.com>
This commit is contained in:
Justin M. Keyes
2026-07-25 12:47:51 -04:00
committed by GitHub
parent 43a0258f55
commit 715d8887ec
15 changed files with 153 additions and 142 deletions

View File

@@ -4,21 +4,20 @@ local n = require('test.functional.testnvim')()
local describe, it, before_each, after_each = t.describe, t.it, t.before_each, t.after_each
local clear, command, eval, eq = n.clear, n.command, n.eval, t.eq
local mkdir = t.mkdir
local fn = n.fn
before_each(function()
clear()
mkdir('test-glob')
-- Long path might cause "Press ENTER" prompt; use :silent to avoid it.
command('silent cd test-glob')
end)
after_each(function()
vim.uv.fs_rmdir('test-glob')
end)
describe('glob()', function()
before_each(function()
clear()
mkdir('test-glob')
-- Long path might cause "Press ENTER" prompt; use :silent to avoid it.
command('silent cd test-glob')
end)
after_each(function()
vim.uv.fs_rmdir('test-glob')
end)
it("glob('.*') returns . and .. ", function()
eq({ '.', '..' }, eval("glob('.*', 0, 1)"))
-- Do it again to verify scandir_next_with_dots() internal state.