diff options
author | Bart Libert <lapino@gmail.com> | 2016-10-20 13:30:45 +0200 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2016-10-20 12:30:45 +0100 |
commit | a34fb0a6a7f920cd4d9a3e50facf51f8d5defea2 (patch) | |
tree | 74b97ad98e528be7df75259275ada10451769b12 /test/test_common_handlers.vader | |
parent | acb209aa11960211718b7cb9b55688e5be1adc63 (diff) | |
download | ale-a34fb0a6a7f920cd4d9a3e50facf51f8d5defea2.zip |
Add support for cppcheck (#126)
* Add support for cppcheck
* Fix vint error in cppcheck handler
* Add vader test for CppCheck format handler
Diffstat (limited to 'test/test_common_handlers.vader')
-rw-r--r-- | test/test_common_handlers.vader | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_common_handlers.vader b/test/test_common_handlers.vader index 678b9337..6fee00b8 100644 --- a/test/test_common_handlers.vader +++ b/test/test_common_handlers.vader @@ -138,5 +138,33 @@ Then (The loclist should be correct): \ }, \], g:loclist +Execute (Run HandleCppCheckFormat): + let g:loclist = ale#handlers#HandleCppCheckFormat(42, [ + \ '[/tmp/test.c:5]: (style) Variable a is assigned a value that is never used.', + \ '[/tmp/test.c:12]: (error) Array a[10] accessed at index 10, which is out of bounds.' + \]) + +Then (The loclist should be correct): + AssertEqual [ + \ { + \ 'bufnr': 42, + \ 'vcol': 0, + \ 'nr': -1, + \ 'lnum': 5, + \ 'col': 0, + \ 'type': 'W', + \ 'text': 'Variable a is assigned a value that is never used. (style)', + \ }, + \ { + \ 'bufnr': 42, + \ 'vcol': 0, + \ 'nr': -1, + \ 'lnum': 12, + \ 'col': 0, + \ 'type': 'E', + \ 'text': 'Array a[10] accessed at index 10, which is out of bounds. (error)', + \ }, + \], g:loclist + After: unlet g:loclist |