This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_glslang_command_callback.vader

41 lines
1.1 KiB
Text
Raw Normal View History

Before:
Save g:ale_glsl_glslang_executable
Save g:ale_glsl_glslang_options
unlet! g:ale_glsl_glslang_executable
unlet! g:ale_glsl_glslang_options
runtime ale_linters/glsl/glslang.vim
call ale#test#SetDirectory('/testplugin/test/command_callback')
After:
Restore
call ale#linter#Reset()
Execute(Executable should default to glslangValidator):
AssertEqual
\ 'glslangValidator',
\ ale_linters#glsl#glslang#GetExecutable(bufnr(''))
Execute(Executable should be configurable):
let g:ale_glsl_glslang_executable = 'foobar'
AssertEqual
\ 'foobar',
\ ale_linters#glsl#glslang#GetExecutable(bufnr(''))
Execute(Command should use executable):
AssertEqual
\ 'glslangValidator -C %t',
\ ale_linters#glsl#glslang#GetCommand(bufnr(''))
let g:ale_glsl_glslang_executable = 'foobar'
AssertEqual
\ 'foobar -C %t',
\ ale_linters#glsl#glslang#GetCommand(bufnr(''))
Execute(Options should work):
let g:ale_glsl_glslang_options = '--test'
AssertEqual
\ 'glslangValidator --test -C %t',
\ ale_linters#glsl#glslang#GetCommand(bufnr(''))