summaryrefslogtreecommitdiff
path: root/test/command_callback/test_standard_command_callback.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-10-05 22:31:00 +0100
committerw0rp <devw0rp@gmail.com>2017-10-05 22:31:09 +0100
commit47577564a2294668d7997b261e17fd97f0dd1fe6 (patch)
tree58ae1e9bbe104a528a888e83e7f8d0e9e5155b9f /test/command_callback/test_standard_command_callback.vader
parent25045641fbe92d175f2cd322497c9796d612782a (diff)
downloadale-47577564a2294668d7997b261e17fd97f0dd1fe6.zip
Get more command callback tests to pass on Windows
Diffstat (limited to 'test/command_callback/test_standard_command_callback.vader')
-rw-r--r--test/command_callback/test_standard_command_callback.vader37
1 files changed, 13 insertions, 24 deletions
diff --git a/test/command_callback/test_standard_command_callback.vader b/test/command_callback/test_standard_command_callback.vader
index 193ead83..279109e0 100644
--- a/test/command_callback/test_standard_command_callback.vader
+++ b/test/command_callback/test_standard_command_callback.vader
@@ -19,8 +19,6 @@ After:
unlet! b:executable
- let g:ale_has_override = {}
-
call ale#test#SetFilename('test.txt')
call ale#test#RestoreDirectory()
@@ -29,45 +27,36 @@ After:
Execute(bin/cmd.js paths should be preferred):
call ale#test#SetFilename('standard-test-files/with-cmd/testfile.js')
- let b:executable = g:dir
- \ . '/standard-test-files/with-cmd/node_modules/standard/bin/cmd.js'
+ let b:executable = ale#path#Winify(
+ \ g:dir
+ \ . '/standard-test-files/with-cmd/node_modules/standard/bin/cmd.js'
+ \)
AssertEqual
\ b:executable,
\ ale_linters#javascript#standard#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape(b:executable) . ' --stdin %s',
+ \ (has('win32') ? 'node.exe ' : '')
+ \ . ale#Escape(b:executable)
+ \ . ' --stdin %s',
\ ale_linters#javascript#standard#GetCommand(bufnr(''))
Execute(.bin directories should be used too):
call ale#test#SetFilename('standard-test-files/with-bin/testfile.js')
- let b:executable = g:dir
- \ . '/standard-test-files/with-bin/node_modules/.bin/standard'
-
- AssertEqual
- \ b:executable,
- \ ale_linters#javascript#standard#GetExecutable(bufnr(''))
-
- AssertEqual
- \ ale#Escape(b:executable) . ' --stdin %s',
- \ ale_linters#javascript#standard#GetCommand(bufnr(''))
-
-Execute(.js files should be executed with node on Windows):
- let g:ale_has_override['win32'] = 1
-
- call ale#test#SetFilename('standard-test-files/with-cmd/testfile.js')
-
- let b:executable = g:dir
- \ . '/standard-test-files/with-cmd/node_modules/standard/bin/cmd.js'
+ let b:executable = ale#path#Winify(
+ \ g:dir
+ \ . '/standard-test-files/with-bin/node_modules/.bin/standard'
+ \)
AssertEqual
\ b:executable,
\ ale_linters#javascript#standard#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape('node.exe') . ' ' . ale#Escape(b:executable) . ' --stdin %s',
+ \ ale#Escape(b:executable)
+ \ . ' --stdin %s',
\ ale_linters#javascript#standard#GetCommand(bufnr(''))
Execute(The global executable should be used otherwise):