Fix more random Windows test issues

This commit is contained in:
w0rp 2017-09-09 18:03:34 +01:00
parent 574cb11594
commit f238e15f10
4 changed files with 9 additions and 4 deletions

View file

@ -33,7 +33,7 @@ Before:
call ale#linter#Define('foobar', {
\ 'name': 'testlinter',
\ 'callback': 'TestCallback',
\ 'executable': 'echo',
\ 'executable': has('win32') ? 'cmd' : 'echo',
\ 'command': 'echo foo bar',
\})

View file

@ -66,7 +66,7 @@ Before:
call ale#linter#Define('testft', {
\ 'name': 'x',
\ 'executable': 'true',
\ 'executable': has('win32') ? 'cmd' : 'true',
\ 'command': 'true',
\ 'callback': 'GenerateResults',
\})

View file

@ -7,9 +7,12 @@ After:
unlet! g:dir
Execute(CdString should output the correct command string):
AssertEqual 'cd ''/foo bar/baz'' && ', ale#path#CdString('/foo bar/baz')
" We will check that escaping is done correctly for each platform.
AssertEqual
\ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd "/foo bar/baz" && ',
\ ale#path#CdString('/foo bar/baz')
Execute(BufferCdString should output the correct command string):
call ale#test#SetFilename('foo.txt')
AssertEqual 'cd ' . shellescape(g:dir) . ' && ', ale#path#BufferCdString(bufnr(''))
AssertEqual 'cd ' . ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr(''))

View file

@ -31,6 +31,8 @@ set foldmethod=syntax
set foldlevelstart=10
set foldnestmax=10
set ttimeoutlen=0
" The encoding must be explicitly set for tests for Windows.
set encoding=utf-8
let g:mapleader=','