aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/system_spec.lua
diff options
context:
space:
mode:
authorEnan Ajmain <3nan.ajmain@gmail.com>2022-07-20 20:55:28 +0600
committerEnan Ajmain <3nan.ajmain@gmail.com>2022-09-30 21:08:45 +0600
commitf2482b3b533c8ed131a33aaead332c226a9e6aca (patch)
tree83a82fe714b937f0b564a0d765d2796bbcac3326 /test/functional/vimscript/system_spec.lua
parentb4d42bb9058308c38e3fe9d59458ce65b3f65eb0 (diff)
downloadrneovim-f2482b3b533c8ed131a33aaead332c226a9e6aca.tar.gz
rneovim-f2482b3b533c8ed131a33aaead332c226a9e6aca.tar.bz2
rneovim-f2482b3b533c8ed131a33aaead332c226a9e6aca.zip
fix: :! pwsh redirection for `command not found`
Problem: If the shell command passed to the filtered bang command isn't found, the error isn't redirected to the temp.out file when shell is set to powershell. Solution: Use anonymous function with Invoke-Command operator (&).
Diffstat (limited to 'test/functional/vimscript/system_spec.lua')
-rw-r--r--test/functional/vimscript/system_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/vimscript/system_spec.lua b/test/functional/vimscript/system_spec.lua
index d0061d051e..ed822add72 100644
--- a/test/functional/vimscript/system_spec.lua
+++ b/test/functional/vimscript/system_spec.lua
@@ -642,12 +642,12 @@ describe('shell :!', function()
if iswin() then
feed(':4verbose %!sort /R<cr>')
screen:expect{
- any=[[Executing command: .?Get%-Content .* | & sort /R 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode]]
+ any=[[Executing command: .?& { Get%-Content .* | & sort /R } 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode"]]
}
else
feed(':4verbose %!sort -r<cr>')
screen:expect{
- any=[[Executing command: .?Get%-Content .* | & sort %-r 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode]]
+ any=[[Executing command: .?& { Get%-Content .* | & sort %-r } 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode"]]
}
end
feed('<CR>')