summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/sign/test_linting_sets_signs.vader2
-rw-r--r--test/sign/test_sign_placement.vader2
-rw-r--r--test/util/test_cd_string_commands.vader7
-rw-r--r--test/vimrc2
4 files changed, 9 insertions, 4 deletions
diff --git a/test/sign/test_linting_sets_signs.vader b/test/sign/test_linting_sets_signs.vader
index 1530847e..c2cc0db9 100644
--- a/test/sign/test_linting_sets_signs.vader
+++ b/test/sign/test_linting_sets_signs.vader
@@ -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',
\})
diff --git a/test/sign/test_sign_placement.vader b/test/sign/test_sign_placement.vader
index bb29b643..69ae91ce 100644
--- a/test/sign/test_sign_placement.vader
+++ b/test/sign/test_sign_placement.vader
@@ -66,7 +66,7 @@ Before:
call ale#linter#Define('testft', {
\ 'name': 'x',
- \ 'executable': 'true',
+ \ 'executable': has('win32') ? 'cmd' : 'true',
\ 'command': 'true',
\ 'callback': 'GenerateResults',
\})
diff --git a/test/util/test_cd_string_commands.vader b/test/util/test_cd_string_commands.vader
index f8a97cb8..5f0e92fd 100644
--- a/test/util/test_cd_string_commands.vader
+++ b/test/util/test_cd_string_commands.vader
@@ -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(''))
diff --git a/test/vimrc b/test/vimrc
index c640e3e0..12f030aa 100644
--- a/test/vimrc
+++ b/test/vimrc
@@ -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=','