2017-09-10 07:58:42 -04:00
|
|
|
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
|
2017-12-19 13:23:09 -05:00
|
|
|
\ ale#path#Simplify(g:dir . '/elm-test-files/app/node_modules/.bin/elm-make'),
|
2017-09-10 07:58:42 -04:00
|
|
|
\ 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(''))
|
|
|
|
|