Merge pull request #2012 from paihu/fix-cdstring-win32-change-drive

Fix #2011 MS Windows, lint error when current drive and target file drive is different.
This commit is contained in:
w0rp
2018-10-25 14:24:56 +01:00
committed by w0rp
parent ceb2e8d350
commit 2dbfbe7b02
23 changed files with 83 additions and 77 deletions

View File

@@ -9,10 +9,12 @@ After:
Execute(CdString should output the correct command string):
" We will check that escaping is done correctly for each platform.
AssertEqual
\ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd "/foo bar/baz" && ',
\ has('unix') ? 'cd ''/foo bar/baz'' && ' : 'cd /d "/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 ' . ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr(''))
AssertEqual
\ has('unix') ? 'cd ' . ale#Escape(g:dir) . ' && ' : 'cd /d ' . ale#Escape(g:dir) . ' && ',
\ ale#path#BufferCdString(bufnr(''))