2018-09-07 17:16:22 +00:00
|
|
|
Before:
|
2018-09-17 08:16:41 +00:00
|
|
|
Save g:ale_julia_executable
|
|
|
|
|
2018-09-07 17:16:22 +00:00
|
|
|
call ale#assert#SetUpLinterTest('julia', 'languageserver')
|
|
|
|
|
|
|
|
After:
|
2018-09-17 08:16:41 +00:00
|
|
|
Restore
|
|
|
|
|
2018-09-07 17:16:22 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
|
|
|
Execute(The default executable path should be correct):
|
2018-09-08 18:11:11 +00:00
|
|
|
AssertLinter 'julia',
|
2018-09-09 14:09:05 +00:00
|
|
|
\ ale#Escape('julia') .
|
2020-12-11 23:41:05 +00:00
|
|
|
\' --project=@. --startup-file=no --history-file=no -e ' .
|
2020-12-11 23:16:09 +00:00
|
|
|
\ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);')
|
2018-09-07 17:16:22 +00:00
|
|
|
|
|
|
|
Execute(The executable should be configurable):
|
|
|
|
let g:ale_julia_executable = 'julia-new'
|
|
|
|
|
2018-09-08 18:11:11 +00:00
|
|
|
AssertLinter 'julia-new',
|
2018-09-09 14:09:05 +00:00
|
|
|
\ ale#Escape('julia-new') .
|
2020-12-11 23:41:05 +00:00
|
|
|
\' --project=@. --startup-file=no --history-file=no -e ' .
|
2020-12-11 23:16:09 +00:00
|
|
|
\ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);')
|
2018-09-07 17:16:22 +00:00
|
|
|
|
|
|
|
Execute(The project root should be detected correctly):
|
|
|
|
AssertLSPProject ''
|
|
|
|
|
|
|
|
call ale#test#SetFilename('julia-languageserver-project/test.jl')
|
|
|
|
|
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/julia-languageserver-project')
|