2019-02-02 14:45:32 +00:00
|
|
|
Before:
|
|
|
|
call ale#assert#SetUpLinterTest('tex', 'alex')
|
|
|
|
call ale#test#SetFilename('test_file.tex')
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
|
|
|
Execute(The global executable should be used when the local one cannot be found):
|
|
|
|
AssertLinter 'alex',
|
2021-11-18 04:00:45 +00:00
|
|
|
\ ale#Escape('alex') . ' --stdin --text',
|
2019-02-02 14:45:32 +00:00
|
|
|
|
|
|
|
Execute(Should use the node_modules/.bin executable, if available):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/alex/node-modules/test_file.tex')
|
2019-02-02 14:45:32 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex'),
|
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex'))
|
2021-11-18 04:00:45 +00:00
|
|
|
\ . ' --stdin --text',
|
2019-02-02 14:45:32 +00:00
|
|
|
|
|
|
|
Execute(Should use the node_modules/alex executable, if available):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/alex/node-modules-2/test_file.tex')
|
2019-02-02 14:45:32 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js'),
|
2019-02-02 14:45:32 +00:00
|
|
|
\ (has('win32') ? 'node.exe ' : '')
|
2021-03-20 22:11:22 +00:00
|
|
|
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js'))
|
2021-11-18 04:00:45 +00:00
|
|
|
\ . ' --stdin --text',
|
2019-02-02 14:45:32 +00:00
|
|
|
|
|
|
|
Execute(Should let users configure a global executable and override local paths):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/write-good/node-modules-2/test_file.tex')
|
2019-02-02 14:45:32 +00:00
|
|
|
|
|
|
|
let g:ale_alex_executable = '/path/to/custom/alex'
|
|
|
|
let g:ale_alex_use_global = 1
|
|
|
|
|
|
|
|
AssertLinter '/path/to/custom/alex',
|
2021-11-18 04:00:45 +00:00
|
|
|
\ ale#Escape('/path/to/custom/alex') . ' --stdin --text'
|