X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/linter/test_rust_analyzer.vader diff --git a/.vim/bundle/ale/test/linter/test_rust_analyzer.vader b/.vim/bundle/ale/test/linter/test_rust_analyzer.vader new file mode 100644 index 00000000..1dd2c780 --- /dev/null +++ b/.vim/bundle/ale/test/linter/test_rust_analyzer.vader @@ -0,0 +1,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']}}