summaryrefslogtreecommitdiff
path: root/test/linter/test_rust_analyzer.vader
blob: 1dd2c780c2d79a07d734ce6a9746638aecc3da5b (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
Before:
  call ale#assert#SetUpLinterTest('rust', 'analyzer')

After:
  call ale#assert#TearDownLinterTest()

Execute(The default executable path should be correct):
  AssertLinter 'rust-analyzer', ale#Escape('rust-analyzer')

Execute(The project root should be detected correctly in cargo projects):
  call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs')

  AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo')

Execute(The project root should be detected correctly in non-cargo projects):
  call ale#test#SetFilename('../test-files/rust/rust-project/testfile.rs')

  AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/rust-project')

Execute(The project root should be empty when no project files can be detected):
  call ale#test#SetFilename('../test-files/dummy')

  AssertLSPProject ''

Execute(Should accept configuration settings):
  AssertLSPConfig {}
  let b:ale_rust_analyzer_config = {'diagnostics': {'disabled': ['unresolved-import']}}
  AssertLSPOptions {'diagnostics': {'disabled': ['unresolved-import']}}