File: test_rust_analyzer.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (28 lines) | stat: -rw-r--r-- 1,065 bytes parent folder | download | duplicates (2)
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']}}