blob: 3870b5c4b3e1f78984d90585f3a4fb9ede9a52e1 (
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
44
45
46
47
48
|
Before:
let b:files = '../test-files/erlang'
call ale#assert#SetUpLinterTest('erlang', 'erlang_ls')
After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'erlang_ls',
\ ale#Escape('erlang_ls') . ' --log-level=' . ale#Escape('info')
Execute(Executable should be configurable):
let b:ale_erlang_erlang_ls_executable = '/path/to/erlang_ls'
AssertLinter '/path/to/erlang_ls',
\ ale#Escape('/path/to/erlang_ls') . ' --log-level=' . ale#Escape('info')
Execute(Log level should be configurable):
let b:ale_erlang_erlang_ls_log_level = 'debug'
AssertLinter 'erlang_ls',
\ ale#Escape('erlang_ls') . ' --log-level=' . ale#Escape('debug')
Execute(Log directory should be configurable):
let b:ale_erlang_erlang_ls_log_dir = '/path/to/logs'
AssertLinter 'erlang_ls',
\ ale#Escape('erlang_ls')
\ . ' --log-dir=' . ale#Escape('/path/to/logs')
\ . ' --log-level=' . ale#Escape('info')
Execute(Project root should be detected using erlang_ls.config):
call ale#test#SetFilename(b:files . '/app_with_erlang_ls_config/src/app.erl')
AssertLSPProject ale#test#GetFilename(b:files . '/app_with_erlang_ls_config')
call ale#test#SetFilename(b:files . '/app_with_erlang_ls_config/_build/default/lib/dep/src/dep.erl')
AssertLSPProject ale#test#GetFilename(b:files . '/app_with_erlang_ls_config')
Execute(Root of Rebar3 project should be detected):
call ale#test#SetFilename(b:files . '/app/src/app.erl')
AssertLSPProject ale#test#GetFilename(b:files . '/app')
call ale#test#SetFilename(b:files . '/app/_build/default/lib/dep/src/dep.erl')
AssertLSPProject ale#test#GetFilename(b:files . '/app')
Execute(Root of kerl managed Erlang/OTP installation should be detected):
call ale#test#SetFilename(b:files . '/kerl_otp_root/lib/stdlib-4.1.1/array.erl')
AssertLSPProject ale#test#GetFilename(b:files . '/kerl_otp_root')
|