summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoseGRuiz <joseruiz75211@hotmail.com>2023-07-24 07:43:13 -0500
committerGitHub <noreply@github.com>2023-07-24 21:43:13 +0900
commit481c5cccbf48f6df97cfa1489e811438b4f2f088 (patch)
tree885fd2e55633239a85e4256cae083b29573e699f /test
parent93a4f70414cf6b632083127998ad5c80b1615e2e (diff)
downloadale-481c5cccbf48f6df97cfa1489e811438b4f2f088.zip
fixed parsing errors when certain options are used in glslangValidator (#4540)
* fixed parsing errors when certain options are used in glslang * Update glslang.vim set column number to 0 like it is always set by glslangValidator * Added a test for the handler of glslangValidator
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_glslang_handler.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/handler/test_glslang_handler.vader b/test/handler/test_glslang_handler.vader
index 6d3a7999..9952c0a8 100644
--- a/test/handler/test_glslang_handler.vader
+++ b/test/handler/test_glslang_handler.vader
@@ -22,3 +22,27 @@ Execute(The glsl glslang handler should parse lines correctly):
\ 'WARNING: 0:121: ''switch'' : last case/default label not followed by statements',
\ 'ERROR: 2 compilation errors. No code generated.',
\ ])
+
+Execute(The glsl glslang handler should parse lines with options -V or -G correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 7,
+ \ 'col': 0,
+ \ 'type': 'E',
+ \ 'text': '''non-opaque uniforms outside a block'' : not allowed when using GLSL for Vulkan',
+ \ },
+ \ {
+ \ 'lnum': 14,
+ \ 'col': 0,
+ \ 'type': 'W',
+ \ 'text': '''__shininess'' : identifiers containing consecutive underscores ("__") are reserved',
+ \ },
+ \ ],
+ \ ale_linters#glsl#glslang#Handle(bufnr(''), [
+ \ 'shader.vert',
+ \ 'ERROR: shader.vert:7: ''non-opaque uniforms outside a block'' : not allowed when using GLSL for Vulkan',
+ \ 'WARNING: shader.vert:14: ''__shininess'' : identifiers containing consecutive underscores ("__") are reserved',
+ \ 'ERROR: 1 compilation errors. No code generated.',
+ \ 'SPIR-V is not generated for failed compile or link',
+ \ ])