summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-03-06 18:33:00 +0000
committerGitHub <noreply@github.com>2017-03-06 18:33:00 +0000
commit70fb1606adbbcfd29ba54b22f9b85fa8e3bd8e64 (patch)
tree7b30145cb6b6e0e4643b8013de02d925c92fffb6 /test
parent76df2d393b6b79f1f0d3095589e7f3ac90de2b40 (diff)
parentf659d975049720f4bf3723c0aa29e6391e06f4e2 (diff)
downloadale-70fb1606adbbcfd29ba54b22f9b85fa8e3bd8e64.zip
Merge pull request #383 from alibabzo/add-nix-linter
Add support for nix linting
Diffstat (limited to 'test')
-rw-r--r--test/test_nix_handler.vader26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test_nix_handler.vader b/test/test_nix_handler.vader
new file mode 100644
index 00000000..188d3fa9
--- /dev/null
+++ b/test/test_nix_handler.vader
@@ -0,0 +1,26 @@
+Execute(The nix handler should parse nix-instantiate error messages correctly):
+ runtime ale_linters/nix/nix.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 47,
+ \ 'lnum': 23,
+ \ 'col': 14,
+ \ 'text': 'error: syntax error, unexpected IN',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'bufnr': 47,
+ \ 'lnum': 3,
+ \ 'col': 12,
+ \ 'text': 'error: syntax error, unexpected ''='', expecting '';''',
+ \ 'type': 'E',
+ \ },
+ \
+ \ ],
+ \ ale_linters#nix#nix#Handle(47, [
+ \ 'This line should be ignored',
+ \ 'error: syntax error, unexpected IN, at /path/to/filename.nix:23:14',
+ \ 'error: syntax error, unexpected ''='', expecting '';'', at /path/to/filename.nix:3:12',
+ \ ])