Elm local install support (#915)
* Add Elm support for npm local installation
This commit is contained in:
parent
c11d2ae375
commit
18a7d32c4c
7 changed files with 71 additions and 5 deletions
36
test/test_elm_executable_detection.vader
Normal file
36
test/test_elm_executable_detection.vader
Normal file
|
@ -0,0 +1,36 @@
|
|||
Before:
|
||||
call ale#test#SetDirectory('/testplugin/test')
|
||||
runtime ale_linters/elm/make.vim
|
||||
|
||||
After:
|
||||
unlet! g:ale_elm_make_use_global
|
||||
unlet! g:ale_elm_make_executable
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(should get valid executable with default params):
|
||||
call ale#test#SetFilename('elm-test-files/app/testfile.elm')
|
||||
|
||||
AssertEqual
|
||||
\ g:dir . '/elm-test-files/app/node_modules/.bin/elm-make',
|
||||
\ ale_linters#elm#make#GetExecutable(bufnr(''))
|
||||
|
||||
Execute(should get valid executable with 'use_global' params):
|
||||
let g:ale_elm_make_use_global = 1
|
||||
|
||||
call ale#test#SetFilename('elm-test-files/app/testfile.elm')
|
||||
|
||||
AssertEqual
|
||||
\ 'elm-make',
|
||||
\ ale_linters#elm#make#GetExecutable(bufnr(''))
|
||||
|
||||
Execute(should get valid executable with 'use_global' and 'executable' params):
|
||||
let g:ale_elm_make_executable = 'other-elm-make'
|
||||
let g:ale_elm_make_use_global = 1
|
||||
|
||||
call ale#test#SetFilename('elm-test-files/app/testfile.elm')
|
||||
|
||||
AssertEqual
|
||||
\ 'other-elm-make',
|
||||
\ ale_linters#elm#make#GetExecutable(bufnr(''))
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue