summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorD. Ben Knoble <ben.knoble+github@gmail.com>2020-10-01 13:11:56 -0400
committerD. Ben Knoble <ben.knoble+github@gmail.com>2020-10-01 13:12:43 -0400
commit81b92bcbfa78074c550f46a83629645c6a1a4412 (patch)
tree62fdc49dc0df1efc9f930af02c486981050168bb /test/handler
parente32d5fc03d159c659e8294bbe1656fafa77bfdda (diff)
downloadale-81b92bcbfa78074c550f46a83629645c6a1a4412.zip
prolog/swipl: add test for new format
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_swipl_handler.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/handler/test_swipl_handler.vader b/test/handler/test_swipl_handler.vader
index 9e425cf6..7986c6a1 100644
--- a/test/handler/test_swipl_handler.vader
+++ b/test/handler/test_swipl_handler.vader
@@ -35,6 +35,22 @@ Execute (The swipl handler should handle a warning / error of two lines):
\ ' Singleton variables: [M]',
\ ])
+Execute (The swipl handler should handle a warning / error of two lines in the new format):
+ call ale#test#SetFilename('test.pl')
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 9,
+ \ 'col': 0,
+ \ 'text': 'Singleton variables: [M]',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale_linters#prolog#swipl#Handle(bufnr(''), [
+ \ 'Warning: /path/to/test.pl:9:',
+ \ 'Warning: Singleton variables: [M]',
+ \ ])
+
Execute (The swipl handler should join three or more lines with '. '):
call ale#test#SetFilename('test.pl')
AssertEqual