2017-03-28 23:56:39 +00:00
|
|
|
Before:
|
2017-07-09 21:43:25 +00:00
|
|
|
call ale#test#SetDirectory('/testplugin/test')
|
2017-03-28 23:56:39 +00:00
|
|
|
|
|
|
|
runtime ale_linters/css/csslint.vim
|
|
|
|
|
|
|
|
After:
|
2017-07-09 21:43:25 +00:00
|
|
|
call ale#test#RestoreDirectory()
|
2017-03-28 23:56:39 +00:00
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(--config should be set when the .csslintrc file is found):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/csslint/some-app/subdir/testfile.js')
|
2017-03-28 23:56:39 +00:00
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ (
|
|
|
|
\ 'csslint --format=compact '
|
2021-03-20 22:11:22 +00:00
|
|
|
\ . '--config=' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/csslint/some-app/.csslintrc'))
|
2017-03-28 23:56:39 +00:00
|
|
|
\ . ' %t'
|
|
|
|
\ ),
|
|
|
|
\ ale_linters#css#csslint#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute(--config should not be used when no .csslintrc file exists):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/csslint/other-app/testfile.css')
|
2017-03-28 23:56:39 +00:00
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ (
|
|
|
|
\ 'csslint --format=compact '
|
|
|
|
\ . ' %t'
|
|
|
|
\ ),
|
|
|
|
\ ale_linters#css#csslint#GetCommand(bufnr(''))
|