diff options
author | Horacio Sanson <hsanson@gmail.com> | 2021-01-25 13:53:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 13:53:09 +0900 |
commit | 3a1728297a915b6e41c6339d571e85bc3756e5ff (patch) | |
tree | ecb5a815a6e1a14bedcd7f21f830ece069d882f7 /test/handler | |
parent | 471e20ed2bfb373068ccd54db5603bd3f4dcbae0 (diff) | |
parent | 72dbd7f648e90c1a9e73234719458c73b0b415dc (diff) | |
download | ale-3a1728297a915b6e41c6339d571e85bc3756e5ff.zip |
Merge pull request #3227 from Ma27/nixunstable-error-fmt
Update error-parser for `nix-instantiate` on Nix 2.4+
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_nix_handler.vader | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/handler/test_nix_handler.vader b/test/handler/test_nix_handler.vader index 398e1ac8..87e8b68f 100644 --- a/test/handler/test_nix_handler.vader +++ b/test/handler/test_nix_handler.vader @@ -8,6 +8,29 @@ Execute(The nix handler should parse nix-instantiate error messages correctly): AssertEqual \ [ \ { + \ 'lnum': 6, + \ 'col': 3, + \ 'type': 'E', + \ 'text': "syntax error, unexpected ']', expecting ';'", + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'type': 'E', + \ 'text': "undefined variable 'foo'", + \ }, + \ + \ ], + \ ale_linters#nix#nix#Handle(bufnr(''), [ + \ "@nix {\"line\":6,\"column\":3,\"raw_msg\":\"syntax error, unexpected ']', expecting ';'\"}", + \ "@nix {\"line\":3,\"column\":5,\"raw_msg\":\"undefined variable 'foo'\"}", + \ "@nix {\"unrelated\":\"message\"}" + \ ]) + +Execute(The nix handler should parse message from old nix-instantiate correctly): + AssertEqual + \ [ + \ { \ 'lnum': 23, \ 'col': 14, \ 'text': 'error: syntax error, unexpected IN', |