aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-07-01 16:20:34 +0200
committerGitHub <noreply@github.com>2021-07-01 16:20:34 +0200
commitf133ab598f063b1d8afb5fb6f97f7f4702dd14ee (patch)
treea95257b613845901f543e675ebe906699380957f /test/functional/helpers.lua
parenta50a3a12d6dc877e63cc5645c68e15c512517ffb (diff)
parent27ea0d37e18d86c13c2e5ddb832ca6bff20f93de (diff)
downloadrneovim-f133ab598f063b1d8afb5fb6f97f7f4702dd14ee.tar.gz
rneovim-f133ab598f063b1d8afb5fb6f97f7f4702dd14ee.tar.bz2
rneovim-f133ab598f063b1d8afb5fb6f97f7f4702dd14ee.zip
Merge pull request #14792 from shadmansaleh/refactor/mkdir_p
Refactor(tests): Use os commands in mkdir_p helper
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 08ca14c3df..91c2364a72 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -878,9 +878,11 @@ function module.os_kill(pid)
or 'kill -9 '..pid..' > /dev/null'))
end
--- Create directories with non exsisting intermidiate directories
+-- Create folder with non existing parents
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
module = global_helpers.tbl_extend('error', module, global_helpers)