summaryrefslogtreecommitdiff
path: root/test/handler/test_cmake_lint_handler.vader
diff options
context:
space:
mode:
authorCarl Smedstad <carl.smedstad@protonmail.com>2022-02-06 13:09:38 +0100
committerGitHub <noreply@github.com>2022-02-06 21:09:38 +0900
commitc9938bc293da6c868d85627fc0f2befc037bb997 (patch)
tree41d3ca475d5fa46da93f0fbf5dc4fc74e900a0cc /test/handler/test_cmake_lint_handler.vader
parent7cbb68da6c5664a4e2aba533fe1f969373c60d5c (diff)
downloadale-c9938bc293da6c868d85627fc0f2befc037bb997.zip
Add CMake linter cmake-lint (#4036)
* Add CMake linter cmake-lint Add support for the CMake linter provided by https://github.com/cheshirekow/cmake_format. * Escape cmake-lint executable and add linter tests
Diffstat (limited to 'test/handler/test_cmake_lint_handler.vader')
-rw-r--r--test/handler/test_cmake_lint_handler.vader30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/handler/test_cmake_lint_handler.vader b/test/handler/test_cmake_lint_handler.vader
new file mode 100644
index 00000000..26fb8c1d
--- /dev/null
+++ b/test/handler/test_cmake_lint_handler.vader
@@ -0,0 +1,30 @@
+Before:
+ runtime ale_linters/cmake/cmake_lint.vim
+
+After:
+ Restore
+
+ call ale#linter#Reset()
+
+Execute(The cmake_lint handler should handle basic warnings):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 126,
+ \ 'col': 0,
+ \ 'type': 'W',
+ \ 'code': 'C0301',
+ \ 'text': 'Line too long (136/80)',
+ \ },
+ \ {
+ \ 'lnum': 139,
+ \ 'col': 4,
+ \ 'type': 'W',
+ \ 'code': 'C0113',
+ \ 'text': 'Missing COMMENT in statement which allows it',
+ \ },
+ \ ],
+ \ ale_linters#cmake#cmake_lint#Handle(1, [
+ \ 'CMakeLists.txt:126: [C0301] Line too long (136/80)',
+ \ 'CMakeLists.txt:139,04: [C0113] Missing COMMENT in statement which allows it',
+ \ ])