fix has('unix') equal 0 is windows.
This commit is contained in:
parent
f4395f5b8c
commit
d14db50c44
@ -8,21 +8,13 @@ After:
|
|||||||
|
|
||||||
Execute(CdString should output the correct command string):
|
Execute(CdString should output the correct command string):
|
||||||
" We will check that escaping is done correctly for each platform.
|
" We will check that escaping is done correctly for each platform.
|
||||||
if has('win32')
|
AssertEqual
|
||||||
AssertEqual
|
\ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd /d "/foo bar/baz" && ',
|
||||||
\ 'cd /d "/foo bar/baz" && ',
|
\ ale#path#CdString('/foo bar/baz')
|
||||||
\ ale#path#CdString('/foo bar/baz')
|
|
||||||
else
|
|
||||||
AssertEqual
|
|
||||||
\ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd "/foo bar/baz" && ',
|
|
||||||
\ ale#path#CdString('/foo bar/baz')
|
|
||||||
endif
|
|
||||||
|
|
||||||
Execute(BufferCdString should output the correct command string):
|
Execute(BufferCdString should output the correct command string):
|
||||||
call ale#test#SetFilename('foo.txt')
|
call ale#test#SetFilename('foo.txt')
|
||||||
|
|
||||||
if has('win32')
|
AssertEqual
|
||||||
AssertEqual 'cd /d ' .ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr(''))
|
\ has('unix') ? 'cd ' . ale#Escape(g:dir) . ' && ' : 'cd /d ' . ale#Escape(g:dir) . ' && ',
|
||||||
else
|
\ ale#path#BufferCdString(bufnr(''))
|
||||||
AssertEqual 'cd ' . ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr(''))
|
|
||||||
endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user