summaryrefslogtreecommitdiff
path: root/test/command_callback/test_glslang_command_callback.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/command_callback/test_glslang_command_callback.vader')
-rw-r--r--test/command_callback/test_glslang_command_callback.vader41
1 files changed, 10 insertions, 31 deletions
diff --git a/test/command_callback/test_glslang_command_callback.vader b/test/command_callback/test_glslang_command_callback.vader
index 1b1722a4..980406af 100644
--- a/test/command_callback/test_glslang_command_callback.vader
+++ b/test/command_callback/test_glslang_command_callback.vader
@@ -1,40 +1,19 @@
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')
+ call ale#assert#SetUpLinterTest('glsl', 'glslang')
After:
- Restore
- call ale#linter#Reset()
+ call ale#assert#TearDownLinterTest()
-Execute(Executable should default to glslangValidator):
- AssertEqual
- \ 'glslangValidator',
- \ ale_linters#glsl#glslang#GetExecutable(bufnr(''))
+Execute(The default command should be correct):
+ AssertLinter 'glslangValidator', ale#Escape('glslangValidator') . ' -C %t'
-Execute(Executable should be configurable):
- let g:ale_glsl_glslang_executable = 'foobar'
- AssertEqual
- \ 'foobar',
- \ ale_linters#glsl#glslang#GetExecutable(bufnr(''))
+Execute(The executable should be configurable):
+ let b:ale_glsl_glslang_executable = 'foobar'
-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(''))
+ AssertLinter 'foobar', ale#Escape('foobar') . ' -C %t'
Execute(Options should work):
let g:ale_glsl_glslang_options = '--test'
- AssertEqual
- \ 'glslangValidator --test -C %t',
- \ ale_linters#glsl#glslang#GetCommand(bufnr(''))
+
+ AssertLinter 'glslangValidator',
+ \ ale#Escape('glslangValidator') . ' --test -C %t'