mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Add the . and .. entries to glob()
os_scandir() and os_scandir_next() skip over those, because of the unverlying libuv funcitons behaviour. Fixes #2954
This commit is contained in:
committed by
Justin M. Keyes
parent
746a4e9f84
commit
ea551044ea
21
test/functional/eval/glob_spec.lua
Normal file
21
test/functional/eval/glob_spec.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local helpers = require('test.functional.helpers')
|
||||
local clear, execute, eval, eq = helpers.clear, helpers.execute, helpers.eval, helpers.eq
|
||||
|
||||
before_each(function()
|
||||
clear()
|
||||
lfs.mkdir('test-glob')
|
||||
execute('cd test-glob')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
lfs.rmdir('test-glob')
|
||||
end)
|
||||
|
||||
describe('glob()', function()
|
||||
it("glob('.*') returns . and .. ", function()
|
||||
eq({'.', '..'}, eval("glob('.*', 0, 1)"))
|
||||
end)
|
||||
it("glob('*') returns an empty list ", function()
|
||||
eq({}, eval("glob('*', 0, 1)"))
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user