Make every test set filenames and switch directories in the same way, and fix some missing escaping for the rubocop linter

This commit is contained in:
w0rp
2017-07-09 22:43:25 +01:00
parent b50a7318fb
commit 6a84605c57
22 changed files with 68 additions and 139 deletions

View File

@@ -2,25 +2,17 @@ Before:
let g:ale_chef_foodcritic_options = '-t ~F011'
let g:ale_chef_foodcritic_executable = 'foodcritic'
silent! cd /testplugin/test
let g:dir = getcwd()
call ale#test#SetDirectory('/testplugin/test')
runtime ale_linters/chef/foodcritic.vim
After:
let g:ale_chef_foodcritic_options = ''
let g:ale_chef_foodcritic_executable = ''
silent execute 'cd ' . g:dir
unlet! g:dir
call ale#test#RestoreDirectory()
call ale#linter#Reset()
Execute(command line should be assembled correctly):
AssertEqual
\ 'foodcritic -t \~F011 %t',
\ ale_linters#chef#foodcritic#GetCommand(bufnr(''))
:q