summaryrefslogtreecommitdiff
path: root/test/handler/test_cypher_lint_handler.vader
diff options
context:
space:
mode:
authorFrancisco Lopes <francisco@oblita.com>2019-02-03 03:04:23 -0200
committerFrancisco Lopes <francisco@oblita.com>2019-02-03 03:09:51 -0200
commit626572a53962d47545fcc67e2045d3eb984cbef1 (patch)
treee2a59a89c5862634723ef7a4caef1640d882f497 /test/handler/test_cypher_lint_handler.vader
parent4d426bf2873c6e1cd2c71e478c756903307628d3 (diff)
downloadale-626572a53962d47545fcc67e2045d3eb984cbef1.zip
linter/cypher: add cypher-lint
Diffstat (limited to 'test/handler/test_cypher_lint_handler.vader')
-rw-r--r--test/handler/test_cypher_lint_handler.vader21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/handler/test_cypher_lint_handler.vader b/test/handler/test_cypher_lint_handler.vader
new file mode 100644
index 00000000..066adae4
--- /dev/null
+++ b/test/handler/test_cypher_lint_handler.vader
@@ -0,0 +1,21 @@
+Before:
+ runtime ale_linters/cypher/cypher_lint.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The cypher-lint handler should handle errors for the current file correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 1,
+ \ 'col': 75,
+ \ 'type': 'E',
+ \ 'text': "Invalid input ',': expected an identifier, shortestPath, allShortestPaths or '('",
+ \ },
+ \ ],
+ \ ale_linters#cypher#cypher_lint#Handle(bufnr(''), [
+ \ "shakespeare.cql:1:75: Invalid input ',': expected an identifier, shortestPath, allShortestPaths or '('",
+ \ "CREATE (shakespeare:Author {firstname:'William', lastname:'Shakespeare'}),,",
+ \ " ^",
+ \ ])