blob: b0d0af98e0d8b2f61b5d9aafe031896869af7ee2 (
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
|
Before:
call ale#assert#SetUpLinterTest('elixir', 'mix')
let g:env_prefix = has('win32')
\ ? 'set MIX_BUILD_PATH=' . ale#Escape('TEMP_DIR') . ' && '
\ : 'MIX_BUILD_PATH=' . ale#Escape('TEMP_DIR') . ' '
After:
unlet! g:env_prefix
call ale#assert#TearDownLinterTest()
Execute(The default mix command should be correct):
call ale#test#SetFilename('elixir_paths/mix_project/lib/app.ex')
AssertLinter 'mix',
\ ale#path#CdString(ale#path#Simplify(g:dir . '/elixir_paths/mix_project'))
\ . g:env_prefix
\ . 'mix compile %s'
Execute(FindMixProjectRoot should detect the project root directory via mix.exs):
silent execute 'file ' . fnameescape(g:dir . '/elixir_paths/mix_project/lib/app.ex')
AssertEqual
\ ale#path#Simplify(g:dir . '/elixir_paths/mix_project'),
\ ale#handlers#elixir#FindMixProjectRoot(bufnr(''))
Execute(FindMixUmbrellaRoot should detect the umbrella root directory via mix.exs):
silent execute 'file ' . fnameescape(g:dir . '/elixir_paths/umbrella_project/apps/app1/lib/app.ex')
AssertEqual
\ ale#path#Simplify(g:dir . '/elixir_paths/umbrella_project'),
\ ale#handlers#elixir#FindMixUmbrellaRoot(bufnr(''))
|