mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-19 00:05:04 +08:00
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--lua-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
" Author: Horacio Sanson <https://github.com/hsanson>
|
|
" Description: Tests for solargraph lsp linter.
|
|
Before:
|
|
call ale#assert#SetUpLinterTest('ruby', 'solargraph')
|
|
|
|
After:
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(command callback should return default string):
|
|
AssertLinter 'solargraph', ale#Escape('solargraph') . ' stdio'
|
|
|
|
Execute(command callback executable can be overridden):
|
|
let g:ale_ruby_solargraph_executable = 'foobar'
|
|
AssertLinter 'foobar', ale#Escape('foobar') . ' stdio'
|
|
|
|
Execute(Setting bundle appends 'exec solargraph'):
|
|
let g:ale_ruby_solargraph_executable = 'path to/bundle'
|
|
|
|
AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
|
|
\ . ' exec solargraph'
|
|
\ . ' stdio'
|
|
|
|
Execute(should set solargraph for rails app):
|
|
call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_rails_app')
|
|
|
|
Execute(should set solargraph for ruby app1):
|
|
call ale#test#SetFilename('../test-files/ruby/valid_ruby_app1/lib/file.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app1')
|
|
|
|
Execute(should set solargraph for ruby app2):
|
|
call ale#test#SetFilename('../test-files/ruby/valid_ruby_app2/lib/file.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app2')
|
|
|
|
Execute(should set solargraph for ruby app3):
|
|
call ale#test#SetFilename('../test-files/ruby/valid_ruby_app3/lib/file.rb')
|
|
AssertLSPLanguage 'ruby'
|
|
AssertLSPOptions {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/ruby/valid_ruby_app3')
|
|
|
|
Execute(should accept initialization options):
|
|
AssertLSPOptions {}
|
|
let b:ale_ruby_solargraph_options = { 'diagnostics': 'true' }
|
|
AssertLSPOptions { 'diagnostics': 'true' }
|