summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_javalsp_command_callback.vader49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/command_callback/test_javalsp_command_callback.vader b/test/command_callback/test_javalsp_command_callback.vader
index ca7388c0..122f409b 100644
--- a/test/command_callback/test_javalsp_command_callback.vader
+++ b/test/command_callback/test_javalsp_command_callback.vader
@@ -29,3 +29,52 @@ Execute(The javalsp callback should return backward compatible value):
\]
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(''))