summaryrefslogtreecommitdiff
path: root/test/linter/test_erlang_erlang_ls.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_erlang_erlang_ls.vader')
-rw-r--r--test/linter/test_erlang_erlang_ls.vader44
1 files changed, 33 insertions, 11 deletions
diff --git a/test/linter/test_erlang_erlang_ls.vader b/test/linter/test_erlang_erlang_ls.vader
index 3870b5c4..2a3d7a70 100644
--- a/test/linter/test_erlang_erlang_ls.vader
+++ b/test/linter/test_erlang_erlang_ls.vader
@@ -1,8 +1,9 @@
Before:
- let b:files = '../test-files/erlang'
call ale#assert#SetUpLinterTest('erlang', 'erlang_ls')
After:
+ unlet! b:root
+
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
@@ -30,19 +31,40 @@ Execute(Log directory should be configurable):
\ . ' --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')
+ let b:root = '../test-files/erlang/app_with_erlang_ls_config'
+
+ call ale#test#SetFilename(b:root . '/src/app.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
+
+ call ale#test#SetFilename(b:root . '/_build/default/lib/dep/src/dep.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
- 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')
+ call ale#test#SetFilename(b:root . '/deps/dep/src/dep.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
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')
+ let b:root = '../test-files/erlang/rebar3_app'
+
+ call ale#test#SetFilename(b:root . '/src/app.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
+
+ call ale#test#SetFilename(b:root . '/_build/default/lib/dep/src/dep.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
- call ale#test#SetFilename(b:files . '/app/_build/default/lib/dep/src/dep.erl')
- AssertLSPProject ale#test#GetFilename(b:files . '/app')
+ call ale#test#SetFilename(b:root . '/_checkouts/dep/src/dep.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
+
+Execute(Root of Erlang.mk project should be detected):
+ let b:root = '../test-files/erlang/erlang_mk_app'
+
+ call ale#test#SetFilename(b:root . '/src/app.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
+
+ call ale#test#SetFilename(b:root . '/deps/dep/src/dep.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)
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')
+ let b:root = '../test-files/erlang/kerl_otp_root'
+
+ call ale#test#SetFilename(b:root . '/lib/stdlib-4.1.1/array.erl')
+ AssertLSPProject ale#test#GetFilename(b:root)