summaryrefslogtreecommitdiff
path: root/test/command_callback/test_javalsp_command_callback.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2021-03-21 00:21:49 +0000
committerw0rp <devw0rp@gmail.com>2021-03-21 00:25:33 +0000
commitf7852dbd0a063d6d82ee17a5057fea53cb79b21d (patch)
tree00b98a3c668af9313eedd6936475c81eeef7e9b8 /test/command_callback/test_javalsp_command_callback.vader
parent35caaecc9fc5822f0474e913d0b7655048fd30ee (diff)
downloadale-f7852dbd0a063d6d82ee17a5057fea53cb79b21d.zip
#3633 - Move linter tests into test/linter
Diffstat (limited to 'test/command_callback/test_javalsp_command_callback.vader')
-rw-r--r--test/command_callback/test_javalsp_command_callback.vader80
1 files changed, 0 insertions, 80 deletions
diff --git a/test/command_callback/test_javalsp_command_callback.vader b/test/command_callback/test_javalsp_command_callback.vader
deleted file mode 100644
index 122f409b..00000000
--- a/test/command_callback/test_javalsp_command_callback.vader
+++ /dev/null
@@ -1,80 +0,0 @@
-
-Before:
- call ale#assert#SetUpLinterTest('java', 'javalsp')
-
-After:
- call ale#assert#TearDownLinterTest()
-
-Execute(The javalsp callback should return the correct default value):
- AssertLinter '', ale#Escape('')
-
-Execute(The javalsp java executable should be configurable):
- let b:ale_java_javalsp_executable = '/bin/foobar'
-
- 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, ' ')
-
-Execute(The javalsp should have default config):
- AssertEqual
- \ {
- \ 'java': {
- \ 'classPath': [],
- \ 'externalDependencies': []
- \ }
- \ },
- \ ale_linters#java#javalsp#Config(bufnr(''))
-
-Execute(The javalsp should have default config if user sets empty hash):
- let b:ale_java_javalsp_config = {}
-
- AssertEqual
- \ {
- \ 'java': {
- \ 'classPath': [],
- \ 'externalDependencies': []
- \ }
- \ },
- \ ale_linters#java#javalsp#Config(bufnr(''))
-
-Execute(The javalsp should have add missing config):
- let b:ale_java_javalsp_config = { 'java': { 'classPath': ['aaa.jar'] } }
-
- AssertEqual
- \ {
- \ 'java': {
- \ 'classPath': ['aaa.jar'],
- \ 'externalDependencies': []
- \ }
- \ },
- \ ale_linters#java#javalsp#Config(bufnr(''))
-
- let b:ale_java_javalsp_config =
- \ {
- \ 'java': {
- \ 'externalDependencies': ['unit-test:2.0.0']
- \ }
- \ }
-
- AssertEqual
- \ {
- \ 'java': {
- \ 'classPath': [],
- \ 'externalDependencies': ['unit-test:2.0.0']
- \ }
- \ },
- \ ale_linters#java#javalsp#Config(bufnr(''))