mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 21:25:04 -07:00
Merge pull request #14792 from shadmansaleh/refactor/mkdir_p
Refactor(tests): Use os commands in mkdir_p helper
This commit is contained in:
commit
f133ab598f
@ -443,10 +443,7 @@ describe('user config init', function()
|
|||||||
before_each(function()
|
before_each(function()
|
||||||
rmdir(xhome)
|
rmdir(xhome)
|
||||||
|
|
||||||
-- TODO, make mkdir_p helper
|
mkdir_p(xconfig .. pathsep .. 'nvim')
|
||||||
mkdir(xhome)
|
|
||||||
mkdir(xconfig)
|
|
||||||
mkdir(xconfig .. pathsep .. 'nvim')
|
|
||||||
|
|
||||||
write_file(init_lua_path, [[
|
write_file(init_lua_path, [[
|
||||||
vim.g.lua_rc = 1
|
vim.g.lua_rc = 1
|
||||||
|
@ -878,9 +878,11 @@ function module.os_kill(pid)
|
|||||||
or 'kill -9 '..pid..' > /dev/null'))
|
or 'kill -9 '..pid..' > /dev/null'))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Create directories with non exsisting intermidiate directories
|
-- Create folder with non existing parents
|
||||||
function module.mkdir_p(path)
|
function module.mkdir_p(path)
|
||||||
return module.meths.call_function('mkdir', {path, 'p'})
|
return os.execute((iswin()
|
||||||
|
and 'mkdir '..path
|
||||||
|
or 'mkdir -p '..path))
|
||||||
end
|
end
|
||||||
|
|
||||||
module = global_helpers.tbl_extend('error', module, global_helpers)
|
module = global_helpers.tbl_extend('error', module, global_helpers)
|
||||||
|
Loading…
Reference in New Issue
Block a user