diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-06-19 23:32:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 23:32:06 +0100 |
commit | d2c3141f266270a098d798c0d273a1068bdc5568 (patch) | |
tree | 65c647805cf1b7bef6bd0e90774ea098d5f872bb /test/command_callback | |
parent | 418f8a6fedb2352f559dd3314f3ec75dab0c9589 (diff) | |
parent | 40bf6e6b5c2cd8e5e23141254fa9f8bee5e6cd84 (diff) | |
download | ale-d2c3141f266270a098d798c0d273a1068bdc5568.zip |
Merge pull request #2600 from hsanson/add-javalsp-lsp-options-2
Add support for javalsp configuration options.
Diffstat (limited to 'test/command_callback')
-rw-r--r-- | test/command_callback/test_javalsp_command_callback.vader | 49 |
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('')) |