diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2017-12-01 18:36:44 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-12-01 17:36:44 +0000 |
commit | 51b127a4fd8e581ab0592874db584facb70e9f79 (patch) | |
tree | ce44fd01ca3448d911a52c31164b20f93bf28158 /test/command_callback/test_glslls_command_callback.vader | |
parent | 6053f764bd6f7707af0be0f0520a691571de5705 (diff) | |
download | ale-51b127a4fd8e581ab0592874db584facb70e9f79.zip |
Add glslls (#1179)
* Add glslls-based LSP linter
* Make logfile configureable
Diffstat (limited to 'test/command_callback/test_glslls_command_callback.vader')
-rw-r--r-- | test/command_callback/test_glslls_command_callback.vader | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/command_callback/test_glslls_command_callback.vader b/test/command_callback/test_glslls_command_callback.vader new file mode 100644 index 00000000..e64c2352 --- /dev/null +++ b/test/command_callback/test_glslls_command_callback.vader @@ -0,0 +1,37 @@ +Before: + Save g:ale_glsl_glslls_executable + Save g:ale_glsl_glslls_logfile + + unlet! g:ale_glsl_glslls_executable + unlet! g:ale_glsl_glslls_logfile + + runtime ale_linters/glsl/glslls.vim + call ale#test#SetDirectory('/testplugin/test/command_callback') + +After: + Restore + call ale#linter#Reset() + +Execute(Executable should default to 'glslls'): + AssertEqual + \ 'glslls', + \ ale_linters#glsl#glslls#GetExecutable(bufnr('')) + +Execute(Executable should be configurable): + let g:ale_glsl_glslls_executable = 'foobar' + AssertEqual + \ 'foobar', + \ ale_linters#glsl#glslls#GetExecutable(bufnr('')) + +Execute(Command should use executable): + let command1 = ale_linters#glsl#glslls#GetCommand(bufnr('')) + AssertEqual command1, ale#Escape('glslls') . ' --stdin' + + let g:ale_glsl_glslls_executable = 'foobar' + let command2 = ale_linters#glsl#glslls#GetCommand(bufnr('')) + AssertEqual command2, ale#Escape('foobar') . ' --stdin' + +Execute(Setting logfile should work): + let g:ale_glsl_glslls_logfile = '/tmp/test.log' + let command = ale_linters#glsl#glslls#GetCommand(bufnr('')) + AssertEqual command, ale#Escape('glslls') . ' --verbose -l /tmp/test.log --stdin' |