diff options
author | paihu <paihu@users.noreply.github.com> | 2018-10-22 21:17:57 +0900 |
---|---|---|
committer | paihu <paihu@users.noreply.github.com> | 2018-10-22 21:17:57 +0900 |
commit | eae3f70e75b53501edd132a5a59a08d015aaeafa (patch) | |
tree | 16980438d387836f2ba2b4e24a6986124a7662ba /test/util/test_cd_string_commands.vader | |
parent | f57ad883f2ddb0613ffeffa4529269a6bcaf913a (diff) | |
download | ale-eae3f70e75b53501edd132a5a59a08d015aaeafa.zip |
fix CdString for MS Windows
Diffstat (limited to 'test/util/test_cd_string_commands.vader')
-rw-r--r-- | test/util/test_cd_string_commands.vader | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/util/test_cd_string_commands.vader b/test/util/test_cd_string_commands.vader index 5f0e92fd..04de4052 100644 --- a/test/util/test_cd_string_commands.vader +++ b/test/util/test_cd_string_commands.vader @@ -8,11 +8,21 @@ 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" && ', - \ ale#path#CdString('/foo bar/baz') + if has('win32') + AssertEqual + \ 'cd /d "/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): call ale#test#SetFilename('foo.txt') - AssertEqual 'cd ' . ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr('')) + if has('win32') + AssertEqual 'cd /d ' .ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr('')) + else + AssertEqual 'cd ' . ale#Escape(g:dir) . ' && ', ale#path#BufferCdString(bufnr('')) + endif |