summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-11-08 17:36:22 +0000
committerGitHub <noreply@github.com>2017-11-08 17:36:22 +0000
commit86e807401795e3dcc9cac63dd3deb1323d048f13 (patch)
treeea3a1c303303c700f04532e9fed23ecdb6156dad /test
parent1bf894f48c2169e18e5978c9347e40f186e425ab (diff)
parentda8012971a5f0e6af63b94bc2fc2e8307c09e1c2 (diff)
downloadale-86e807401795e3dcc9cac63dd3deb1323d048f13.zip
Merge pull request #1093 from ttaylorr/master
ale_linters: add 'dafny' linter
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_dafny_handler.vader26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/handler/test_dafny_handler.vader b/test/handler/test_dafny_handler.vader
new file mode 100644
index 00000000..1de9a77f
--- /dev/null
+++ b/test/handler/test_dafny_handler.vader
@@ -0,0 +1,26 @@
+Execute(The Dafny handler should parse output correctly):
+ runtime ale_linters/dafny/dafny.vim
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 0,
+ \ 'col': 45,
+ \ 'lnum': 123,
+ \ 'text': 'A precondition for this call might not hold.',
+ \ 'type': 'E'
+ \ },
+ \ {
+ \ 'bufnr': 0,
+ \ 'col': 90,
+ \ 'lnum': 678,
+ \ 'text': 'This is the precondition that might not hold.',
+ \ 'type': 'W'
+ \ }
+ \ ],
+ \ ale_linters#dafny#dafny#Handle(0, [
+ \ 'File.dfy(123,45): Error BP5002: A precondition for this call might not hold.',
+ \ 'File.dfy(678,90): Related location: This is the precondition that might not hold.'
+ \ ])
+
+After:
+ call ale#linter#Reset()