summaryrefslogtreecommitdiff
path: root/test/linter/test_erlang_erlc.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_erlang_erlc.vader')
-rw-r--r--test/linter/test_erlang_erlc.vader22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/linter/test_erlang_erlc.vader b/test/linter/test_erlang_erlc.vader
index 7d659a07..0651b512 100644
--- a/test/linter/test_erlang_erlc.vader
+++ b/test/linter/test_erlang_erlc.vader
@@ -38,3 +38,25 @@ Execute(The command should accept configured options.):
\ g:matched,
\ -1,
\ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']'
+
+Execute(Linter should recognize OTP23 format.):
+ let g:lines = ["t.erl:6: only association operators '=>' are allowed in map construction"]
+ let g:output_text = ale_linters#erlang#erlc#Handle(bufnr(''), g:lines)[0].text
+
+ let g:expected = "only association operators '=>' are allowed in map construction"
+ AssertEqual
+ \ g:output_text,
+ \ g:expected,
+ \ 'Command error: expected [' . g:output_text . '] to match [' . g:expected . ']'
+
+Execute(Linter should recognize OTP24 format.):
+ let g:lines = ["t.erl:6:16: only association operators '=>' are allowed in map construction",
+ \ "% 6| #{ a => A, b := B }.",
+ \ "% | ^"]
+ let g:output_text = ale_linters#erlang#erlc#Handle(bufnr(''), g:lines)[0].text
+
+ let g:expected = "only association operators '=>' are allowed in map construction"
+ AssertEqual
+ \ g:output_text,
+ \ g:expected,
+ \ 'Command error: expected [' . g:output_text . '] to match [' . g:expected . ']'