aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/system_spec.lua
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-10-11 00:30:20 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-10-10 21:30:20 -0700
commita7fc2f3f64f05ffd2a97c8ccf2e5c74d905ac808 (patch)
treebde48b36336c865218f6ac0f8d1e3bba8a3dc03e /test/functional/eval/system_spec.lua
parentb772b86d2ba256a2c03ab701d00b322cf52560e0 (diff)
downloadrneovim-a7fc2f3f64f05ffd2a97c8ccf2e5c74d905ac808.tar.gz
rneovim-a7fc2f3f64f05ffd2a97c8ccf2e5c74d905ac808.tar.bz2
rneovim-a7fc2f3f64f05ffd2a97c8ccf2e5c74d905ac808.zip
test: "!:&" works with powershell #11201
Removed 'echo' alias because it does not behave like POSIX echo.
Diffstat (limited to 'test/functional/eval/system_spec.lua')
-rw-r--r--test/functional/eval/system_spec.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua
index 0a478fd05c..85d57006b5 100644
--- a/test/functional/eval/system_spec.lua
+++ b/test/functional/eval/system_spec.lua
@@ -84,7 +84,7 @@ describe('system()', function()
it('does NOT run in shell', function()
if iswin() then
- eq("%PATH%\n", eval("system(['powershell', '-NoProfile', '-NoLogo', '-ExecutionPolicy', 'RemoteSigned', '-Command', 'echo', '%PATH%'])"))
+ eq("%PATH%\n", eval("system(['powershell', '-NoProfile', '-NoLogo', '-ExecutionPolicy', 'RemoteSigned', '-Command', 'Write-Output', '%PATH%'])"))
else
eq("* $PATH %PATH%\n", eval("system(['echo', '*', '$PATH', '%PATH%'])"))
end
@@ -133,7 +133,7 @@ describe('system()', function()
eval([[system('"ping" "-n" "1" "127.0.0.1"')]])
eq(0, eval('v:shell_error'))
eq('"a b"\n', eval([[system('cmd /s/c "cmd /s/c "cmd /s/c "echo "a b""""')]]))
- eq('"a b"\n', eval([[system('powershell -NoProfile -NoLogo -ExecutionPolicy RemoteSigned -Command echo ''\^"a b\^"''')]]))
+ eq('"a b"\n', eval([[system('powershell -NoProfile -NoLogo -ExecutionPolicy RemoteSigned -Command Write-Output ''\^"a b\^"''')]]))
end
it('with shell=cmd.exe', function()
@@ -169,9 +169,9 @@ describe('system()', function()
it('works with powershell', function()
helpers.set_shell_powershell()
- eq('a\nb\n', eval([[system('echo a b')]]))
+ eq('a\nb\n', eval([[system('Write-Output a b')]]))
eq('C:\\\n', eval([[system('cd c:\; (Get-Location).Path')]]))
- eq('a b\n', eval([[system('echo "a b"')]]))
+ eq('a b\n', eval([[system('Write-Output "a b"')]]))
end)
end