aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-31 14:21:57 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-31 15:11:08 -0500
commit1836853955e51efbaf4aba7dec0718e51747b418 (patch)
treef9e4ddbe24b3becf0844682e144d5b3ec20d58df
parente922576bdd6abd6736417343121120b289079565 (diff)
downloadrneovim-1836853955e51efbaf4aba7dec0718e51747b418.tar.gz
rneovim-1836853955e51efbaf4aba7dec0718e51747b418.tar.bz2
rneovim-1836853955e51efbaf4aba7dec0718e51747b418.zip
ci: test powershell core on Linux
-rw-r--r--.travis.yml3
-rw-r--r--test/functional/helpers.lua6
-rw-r--r--test/functional/ui/output_spec.lua3
3 files changed, 10 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 0417b67a5f..0fdf8b2534 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -115,9 +115,12 @@ jobs:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
+ - sourceline: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main'
+ key_url: 'https://packages.microsoft.com/keys/microsoft.asc'
packages:
- *common-apt-packages
- gcc-9
+ - powershell
- if: branch = master AND commit_message !~ /\[skip.lint\]/
name: lint
os: linux
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'}, ',')..';'
diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua
index 9b1e803649..d7dde6345f 100644
--- a/test/functional/ui/output_spec.lua
+++ b/test/functional/ui/output_spec.lua
@@ -10,6 +10,7 @@ local iswin = helpers.iswin
local clear = helpers.clear
local command = helpers.command
local nvim_dir = helpers.nvim_dir
+local has_powershell = helpers.has_powershell
local set_shell_powershell = helpers.set_shell_powershell
describe("shell command :!", function()
@@ -228,7 +229,7 @@ describe("shell command :!", function()
]])
end)
end)
- if iswin() or eval('executable("pwsh")') == 1 then
+ if has_powershell() then
it('powershell supports literal strings', function()
set_shell_powershell()
local screen = Screen.new(30, 4)