mirror of
https://github.com/neovim/neovim.git
synced 2026-07-31 12:49:11 +00:00
docs: misc #40847
Co-authored-by: Barrett Ruth <br@barrettruth.com> Co-authored-by: Nathan Zeng <nathan.j.zeng@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user