X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/handler/test_glslang_handler.vader diff --git a/.vim/bundle/ale/test/handler/test_glslang_handler.vader b/.vim/bundle/ale/test/handler/test_glslang_handler.vader new file mode 100644 index 00000000..9952c0a8 --- /dev/null +++ b/.vim/bundle/ale/test/handler/test_glslang_handler.vader @@ -0,0 +1,48 @@ +Before: + runtime ale_linters/glsl/glslang.vim + +Execute(The glsl glslang handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 0, + \ 'type': 'E', + \ 'text': '''gl_ModelViewProjectionMatrix'' : undeclared identifier', + \ }, + \ { + \ 'lnum': 121, + \ 'col': 0, + \ 'type': 'W', + \ 'text': '''switch'' : last case/default label not followed by statements', + \ }, + \ ], + \ ale_linters#glsl#glslang#Handle(bufnr(''), [ + \ 'ERROR: 0:4: ''gl_ModelViewProjectionMatrix'' : undeclared identifier', + \ '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', + \ ])