diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_cmake_lint_handler.vader | 30 | ||||
-rw-r--r-- | test/linter/test_cmake_cmake_lint.vader | 13 |
2 files changed, 43 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', + \ ]) diff --git a/test/linter/test_cmake_cmake_lint.vader b/test/linter/test_cmake_cmake_lint.vader new file mode 100644 index 00000000..6cf09149 --- /dev/null +++ b/test/linter/test_cmake_cmake_lint.vader @@ -0,0 +1,13 @@ +Before: + call ale#assert#SetUpLinterTest('cmake', 'cmake_lint') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'cmake-lint', ale#Escape('cmake-lint') . ' %t' + +Execute(The executable should be configurable): + let g:ale_cmake_cmake_lint_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' %t' |