aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-01-01 06:36:10 -0800
committerGitHub <noreply@github.com>2020-01-01 06:36:10 -0800
commita251b588acb3a561e5da695280774b9b6fbcd0ea (patch)
treee361e0c201d04c304e5c188bf7a9f295a318c0d2 /test/functional/helpers.lua
parent070bd3ea231b6b98c9e9f1057fdbcf31d1877a70 (diff)
parent0da7774cf0e503efc93c15033a94ff756d5252e1 (diff)
downloadrneovim-a251b588acb3a561e5da695280774b9b6fbcd0ea.tar.gz
rneovim-a251b588acb3a561e5da695280774b9b6fbcd0ea.tar.bz2
rneovim-a251b588acb3a561e5da695280774b9b6fbcd0ea.zip
Merge #11642 'CI: test powershell core'
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index eead1ea3e0..0fdfcd70ba 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -504,9 +504,13 @@ function module.source(code)
return fname
end
+function module.has_powershell()
+ return module.eval('executable("'..(iswin() and 'powershell' or 'pwsh')..'")') == 1
+end
+
function module.set_shell_powershell()
local shell = iswin() and 'powershell' or 'pwsh'
- assert(module.eval('executable("'..shell..'")'))
+ assert(module.has_powershell())
local cmd = 'Remove-Item -Force '..table.concat(iswin()
and {'alias:cat', 'alias:echo', 'alias:sleep'}
or {'alias:echo'}, ',')..';'