Files
neovim/test/functional/eval/glob_spec.lua
Felipe Morales ea551044ea Add the . and .. entries to glob()
os_scandir() and os_scandir_next() skip over those, because of the
unverlying libuv funcitons behaviour.

Fixes #2954
2015-08-01 23:16:17 -04:00

22 lines
516 B
Lua

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)