aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorshadmansaleh <shadmansaleh3@gmail.com>2021-06-12 23:09:57 +0600
committershadmansaleh <shadmansaleh3@gmail.com>2021-06-30 23:27:36 +0600
commitb82d8faf53893ee9d0e7b2c6d843efe702dadb57 (patch)
treeb2f1aea868da8fb95d07b079d1476272b84c8aaa /test/functional/helpers.lua
parent48b2092d017bc73ddfbe8d3960a0ab5e98e4f75c (diff)
downloadrneovim-b82d8faf53893ee9d0e7b2c6d843efe702dadb57.tar.gz
rneovim-b82d8faf53893ee9d0e7b2c6d843efe702dadb57.tar.bz2
rneovim-b82d8faf53893ee9d0e7b2c6d843efe702dadb57.zip
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)