summaryrefslogtreecommitdiff
path: root/test/command_callback/test_elixir_ls_command_callbacks.vader
blob: 41a5bc34eeb5df22e59a55e2f10d1ed4ba8bd38f (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
Before:
  call ale#assert#SetUpLinterTest('elixir', 'elixir_ls')

After:
  call ale#assert#TearDownLinterTest()

Execute(should set correct defaults):
  if has('win32')
    AssertLinter 'elixir-ls\language_server.bat', 'elixir-ls\language_server.bat'
  else
    AssertLinter 'elixir-ls/language_server.sh', 'elixir-ls/language_server.sh'
  endif

Execute(should configure elixir-ls release location):
  let b:ale_elixir_elixir_ls_release = 'boo'

  if has('win32')
    AssertLinter 'boo\language_server.bat', 'boo\language_server.bat'
  else
    AssertLinter 'boo/language_server.sh', 'boo/language_server.sh'
  endif

Execute(should set correct LSP values):
  call ale#test#SetFilename('elixir_paths/umbrella_project/apps/app1/lib/app.ex')

  AssertLSPLanguage 'elixir'
  AssertLSPOptions {}
  AssertLSPConfig {}
  AssertLSPProject ale#path#Simplify(g:dir . '/elixir_paths/umbrella_project')

Execute(should accept configuration settings):
  AssertLSPConfig {}
  let b:ale_elixir_elixir_ls_config = {'elixirLS': {'dialyzerEnabled': v:false}}
  AssertLSPConfig {'elixirLS': {'dialyzerEnabled': v:false}}