mirror of
https://github.com/dense-analysis/ale
synced 2024-12-17 20:05:31 +00:00
651038b601
* racket: support racket-langserver lsp * racket-langserver: find highest dir with init.rkt * autoload/ale/racket: re-indent to 4 spaces * racket: lint: sort supported tools * racket: lint: function! This is _not_ needed anymore, but the lint wants it. See :help E127 * racket-langserver: do not use new dict format * racket: lint: use snake_case * add tests for racket-langserver * racket-langserver tests: correct result values
46 lines
1.7 KiB
Plaintext
46 lines
1.7 KiB
Plaintext
" Author: D. Ben Knoble <https://github.com/benknoble>
|
|
" Description: Tests for racket-langserver lsp linter.
|
|
Before:
|
|
call ale#assert#SetUpLinterTest('racket', 'langserver')
|
|
|
|
After:
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(command callback should return default string):
|
|
AssertLinter 'racket', ale#Escape('racket').' -l racket-langserver'
|
|
|
|
Execute(should set racket-langserver for deep module 3):
|
|
call ale#test#SetFilename('../test-files/racket/many-inits/a/b/c/foo.rkt')
|
|
AssertLSPLanguage 'racket'
|
|
AssertLSPOptions {}
|
|
AssertLSPConfig {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits')
|
|
|
|
Execute(should set racket-langserver for deep module 2):
|
|
call ale#test#SetFilename('../test-files/racket/many-inits/a/b/foo.rkt')
|
|
AssertLSPLanguage 'racket'
|
|
AssertLSPOptions {}
|
|
AssertLSPConfig {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits')
|
|
|
|
Execute(should set racket-langserver for deep module 1):
|
|
call ale#test#SetFilename('../test-files/racket/many-inits/a/foo.rkt')
|
|
AssertLSPLanguage 'racket'
|
|
AssertLSPOptions {}
|
|
AssertLSPConfig {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits')
|
|
|
|
Execute(should set racket-langserver for top-level module):
|
|
call ale#test#SetFilename('../test-files/racket/many-inits/foo.rkt')
|
|
AssertLSPLanguage 'racket'
|
|
AssertLSPOptions {}
|
|
AssertLSPConfig {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/racket/many-inits')
|
|
|
|
Execute(should set racket-langserver for non-package module or script):
|
|
call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt')
|
|
AssertLSPLanguage 'racket'
|
|
AssertLSPOptions {}
|
|
AssertLSPConfig {}
|
|
AssertLSPProject ale#test#GetFilename('../test-files/racket/simple-script')
|