diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-05 22:31:00 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-05 22:31:09 +0100 |
commit | 47577564a2294668d7997b261e17fd97f0dd1fe6 (patch) | |
tree | 58ae1e9bbe104a528a888e83e7f8d0e9e5155b9f /test/command_callback/test_rubocop_command_callback.vader | |
parent | 25045641fbe92d175f2cd322497c9796d612782a (diff) | |
download | ale-47577564a2294668d7997b261e17fd97f0dd1fe6.zip |
Get more command callback tests to pass on Windows
Diffstat (limited to 'test/command_callback/test_rubocop_command_callback.vader')
-rw-r--r-- | test/command_callback/test_rubocop_command_callback.vader | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/command_callback/test_rubocop_command_callback.vader b/test/command_callback/test_rubocop_command_callback.vader index a88d453c..fddf7145 100644 --- a/test/command_callback/test_rubocop_command_callback.vader +++ b/test/command_callback/test_rubocop_command_callback.vader @@ -10,24 +10,30 @@ Before: After: Restore + call ale#linter#Reset() call ale#test#RestoreDirectory() Execute(Executable should default to rubocop): AssertEqual - \ '''rubocop'' --format json --force-exclusion --stdin ' - \ . ale#Escape(g:dir . '/dummy.rb'), + \ ale#Escape('rubocop') + \ . ' --format json --force-exclusion --stdin ' + \ . ale#Escape(ale#path#Winify(g:dir . '/dummy.rb')), \ ale_linters#ruby#rubocop#GetCommand(bufnr('')) Execute(Should be able to set a custom executable): let g:ale_ruby_rubocop_executable = 'bin/rubocop' + AssertEqual - \ '''bin/rubocop'' --format json --force-exclusion --stdin ' - \ . ale#Escape(g:dir . '/dummy.rb'), + \ ale#Escape('bin/rubocop') + \ . ' --format json --force-exclusion --stdin ' + \ . ale#Escape(ale#path#Winify(g:dir . '/dummy.rb')), \ ale_linters#ruby#rubocop#GetCommand(bufnr('')) Execute(Setting bundle appends 'exec rubocop'): let g:ale_ruby_rubocop_executable = 'path to/bundle' + AssertEqual - \ '''path to/bundle'' exec rubocop --format json --force-exclusion --stdin ' - \ . ale#Escape(g:dir . '/dummy.rb'), + \ ale#Escape('path to/bundle') . ' exec rubocop' + \ . ' --format json --force-exclusion --stdin ' + \ . ale#Escape(ale#path#Winify(g:dir . '/dummy.rb')), \ ale_linters#ruby#rubocop#GetCommand(bufnr('')) |