You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dot-files/test/test_csslint_config_detecti...

30 lines
791 B
Plaintext

Before:
call ale#test#SetDirectory('/testplugin/test')
runtime ale_linters/css/csslint.vim
After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
Execute(--config should be set when the .csslintrc file is found):
call ale#test#SetFilename('csslint-test-files/some-app/subdir/testfile.js')
AssertEqual
\ (
\ 'csslint --format=compact '
\ . '--config=' . shellescape(g:dir . '/csslint-test-files/some-app/.csslintrc')
\ . ' %t'
\ ),
\ ale_linters#css#csslint#GetCommand(bufnr(''))
Execute(--config should not be used when no .csslintrc file exists):
call ale#test#SetFilename('csslint-test-files/other-app/testfile.css')
AssertEqual
\ (
\ 'csslint --format=compact '
\ . ' %t'
\ ),
\ ale_linters#css#csslint#GetCommand(bufnr(''))