blob: 9b9bf906098e9e2fcc134c0b94007136139ad3e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Before:
call ale#assert#SetUpLinterTest('sass', 'sasslint')
call ale#test#SetFilename('test.sass')
unlet! b:executable
After:
call ale#assert#TearDownLinterTest()
Execute(should default to source, bin/sass-lint.js):
call ale#test#SetFilename('sasslint-test-files/with-source/test.sass')
let b:executable = ale#path#Simplify(
\ g:dir
\ . '/sasslint-test-files/with-source/node_modules/sass-lint/bin/sass-lint.js'
\)
AssertLinter b:executable,
\ (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(b:executable)
\ . ' -v -q -f compact %t'
Execute(should fallback to bin, .bin/sass-lint):
call ale#test#SetFilename('sasslint-test-files/with-bin/test.sass')
let b:executable = ale#path#Simplify(
\ g:dir
\ . '/sasslint-test-files/with-bin/node_modules/.bin/sass-lint'
\)
AssertLinter b:executable, ale#Escape(b:executable) . ' -v -q -f compact %t'
Execute(should fallback to global bin):
AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' -v -q -f compact %t'
Execute(The global executable should be configurable):
let b:ale_sass_sasslint_executable = 'foo'
AssertLinter 'foo', ale#Escape('foo') . ' -v -q -f compact %t'
Execute(The options should be configurable):
let b:ale_sass_sasslint_options = '--bar'
AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' --bar -v -q -f compact %t'
|