summaryrefslogtreecommitdiff
path: root/test/command_callback/test_javalsp_command_callback.vader
diff options
context:
space:
mode:
authorHoracio Sanson <horacio@allm.net>2019-06-05 00:31:56 +0900
committerHoracio Sanson <horacio@allm.net>2019-06-05 00:50:23 +0900
commit5ce97f8cdb285b86a4891fde6dcd14283bc2756f (patch)
treea3096530d1c298c4be7a13beb53df0cf17ebdd8e /test/command_callback/test_javalsp_command_callback.vader
parent42a1fc2d29d710687504043dbb746eefb8248781 (diff)
downloadale-5ce97f8cdb285b86a4891fde6dcd14283bc2756f.zip
Fix javalsp command callback.
The command used to invoke the language server is missing some options to include additional java modules. Without these modules the server was not working properly. The correct command can be found in a `launcher` script on the same directory the `java` executable for the language server is found. This commit changes the docs to prefer the launcher script over the java executable. For backward compatibility it also fixes the command invocation in case the java executable is configured.
Diffstat (limited to 'test/command_callback/test_javalsp_command_callback.vader')
-rw-r--r--test/command_callback/test_javalsp_command_callback.vader21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/command_callback/test_javalsp_command_callback.vader b/test/command_callback/test_javalsp_command_callback.vader
index 8bfaa8ee..aaaceb45 100644
--- a/test/command_callback/test_javalsp_command_callback.vader
+++ b/test/command_callback/test_javalsp_command_callback.vader
@@ -6,9 +6,26 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The javalsp callback should return the correct default value):
- AssertLinter 'java', ale#Escape('java') . ' -Xverify:none -m javacs/org.javacs.Main'
+ AssertLinter 'launcher', ale#Escape('launcher')
Execute(The javalsp java executable should be configurable):
let b:ale_java_javalsp_executable = '/bin/foobar'
- AssertLinter '/bin/foobar', ale#Escape('/bin/foobar') . ' -Xverify:none -m javacs/org.javacs.Main'
+ AssertLinter '/bin/foobar', ale#Escape('/bin/foobar')
+
+Execute(The javalsp callback should return backward compatible value):
+ let b:ale_java_javalsp_executable = '/bin/java'
+ let cmd = [
+ \ ale#Escape('/bin/java'),
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.api=javacs',
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.code=javacs',
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.comp=javacs',
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.main=javacs',
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.tree=javacs',
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.model=javacs',
+ \ '--add-exports jdk.compiler/com.sun.tools.javac.util=javacs',
+ \ '--add-opens jdk.compiler/com.sun.tools.javac.api=javacs',
+ \ '-m javacs/org.javacs.Main',
+ \]
+ AssertLinter '/bin/java', join(cmd, ' ')
+