summaryrefslogtreecommitdiff
path: root/test/handler/test_vint_handler.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-04-11 20:32:57 +0100
committerw0rp <devw0rp@gmail.com>2017-04-11 20:32:57 +0100
commitb06b832447253404180ce6a97927755e4ae68c22 (patch)
treeb8b4b0592ffc245257869edca0066b425e1806f6 /test/handler/test_vint_handler.vader
parent8b890caa31411cd022156dca8e4c7f4c5fb65fc9 (diff)
downloadale-b06b832447253404180ce6a97927755e4ae68c22.zip
#392 Report errors inside of headers, in a very basic way
Diffstat (limited to 'test/handler/test_vint_handler.vader')
-rw-r--r--test/handler/test_vint_handler.vader36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/handler/test_vint_handler.vader b/test/handler/test_vint_handler.vader
new file mode 100644
index 00000000..efd33d10
--- /dev/null
+++ b/test/handler/test_vint_handler.vader
@@ -0,0 +1,36 @@
+Execute(The vint handler should parse error messages correctly):
+ :file! gxc.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 1,
+ \ 'col': 1,
+ \ 'text': 'Use scriptencoding when multibyte char exists (see :help :script encoding)',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 3,
+ \ 'col': 17,
+ \ 'text': 'Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 3,
+ \ 'col': 8,
+ \ 'text': 'Make the scope explicit like `l:filename` (see Anti-pattern of vimrc (Scope of identifier))',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 7,
+ \ 'col': 8,
+ \ 'text': 'Undefined variable: filename (see :help E738)',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale#handlers#gcc#HandleGCCFormat(347, [
+ \ 'gcc.vim:1:1: warning: Use scriptencoding when multibyte char exists (see :help :script encoding)',
+ \ 'gcc.vim:3:17: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))',
+ \ 'gcc.vim:3:8: style_problem: Make the scope explicit like `l:filename` (see Anti-pattern of vimrc (Scope of identifier))',
+ \ 'gcc.vim:7:8: warning: Undefined variable: filename (see :help E738)',
+ \ ])