2017-11-12 11:25:24 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('less', 'lessc')
|
2017-11-12 11:25:24 +00:00
|
|
|
call ale#test#SetFilename('testfile.less')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
unlet! b:executable
|
2017-11-12 11:25:24 +00:00
|
|
|
|
|
|
|
After:
|
|
|
|
unlet! b:executable
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-11-12 11:25:24 +00:00
|
|
|
|
|
|
|
Execute(node_modules directories should be discovered):
|
|
|
|
call ale#test#SetFilename('lessc_paths/nested/testfile.less')
|
|
|
|
|
2017-12-19 18:23:09 +00:00
|
|
|
let b:executable = ale#path#Simplify(
|
2017-11-12 11:25:24 +00:00
|
|
|
\ g:dir
|
|
|
|
\ . '/lessc_paths/node_modules/.bin/lessc'
|
|
|
|
\)
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter b:executable, ale#Escape(b:executable)
|
|
|
|
\ . ' --no-color --lint'
|
|
|
|
\ . ' --include-path='
|
|
|
|
\ . ale#Escape(ale#path#Simplify(g:dir . '/lessc_paths/nested'))
|
|
|
|
\ . ' -'
|
2017-11-12 11:25:24 +00:00
|
|
|
|
|
|
|
Execute(The global override should work):
|
|
|
|
let b:ale_less_lessc_executable = 'foobar'
|
|
|
|
let b:ale_less_lessc_use_global = 1
|
|
|
|
|
|
|
|
call ale#test#SetFilename('lessc_paths/nested/testfile.less')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'foobar', ale#Escape('foobar')
|
|
|
|
\ . ' --no-color --lint'
|
|
|
|
\ . ' --include-path='
|
|
|
|
\ . ale#Escape(ale#path#Simplify(g:dir . '/lessc_paths/nested'))
|
|
|
|
\ . ' -'
|
2017-11-12 11:25:24 +00:00
|
|
|
|
|
|
|
Execute(Extra options should be configurable):
|
|
|
|
let b:ale_less_lessc_options = '--whatever'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'lessc', ale#Escape('lessc')
|
|
|
|
\ . ' --no-color --lint'
|
|
|
|
\ . ' --include-path='
|
|
|
|
\ . ale#Escape(ale#path#Simplify(g:dir))
|
|
|
|
\ . ' --whatever'
|
|
|
|
\ . ' -'
|