Fix #1298 - Escape commands for PowerShell

This commit is contained in:
w0rp
2018-01-17 18:08:17 +00:00
parent f6af75aac4
commit 045c92ed65
4 changed files with 67 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ Execute(History should be set when commands are run):
AssertEqual sort(['status', 'exit_code', 'job_id', 'command']), sort(keys(g:history[0]))
if has('win32')
AssertEqual 'cmd /c echo command history test', g:history[0].command
AssertEqual 'cmd /s/c "echo command history test"', g:history[0].command
else
AssertEqual ['/bin/sh', '-c', '/bin/sh -c ''echo command history test'''], g:history[0].command
endif
@@ -151,7 +151,7 @@ Execute(The history should be updated when fixers are run):
AssertEqual ['finished'], map(copy(b:ale_history), 'v:val.status')
if has('win32')
AssertEqual 'cmd /c echo foo ', split(b:ale_history[0].command, '<')[0]
AssertEqual 'cmd /s/c "echo foo ', split(b:ale_history[0].command, '<')[0]
else
AssertEqual '/bin/sh -c echo foo ', split(join(b:ale_history[0].command), '<')[0]
endif