summaryrefslogtreecommitdiff
path: root/test/test_list_formatting.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-19 23:44:02 +0000
committerw0rp <devw0rp@gmail.com>2017-11-19 23:44:09 +0000
commit597507e5197ef51037d01d30ad819a048eea9c9b (patch)
tree07945599c638ab1bb50097e77f35187fa6938949 /test/test_list_formatting.vader
parent0cb8130d0e65d9a239c43ddb21d2f89b2815f10d (diff)
downloadale-597507e5197ef51037d01d30ad819a048eea9c9b.zip
Make the message formats configurable with buffer local variables
Diffstat (limited to 'test/test_list_formatting.vader')
-rw-r--r--test/test_list_formatting.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/test_list_formatting.vader b/test/test_list_formatting.vader
index 6b494fc2..0c52f10f 100644
--- a/test/test_list_formatting.vader
+++ b/test/test_list_formatting.vader
@@ -28,6 +28,7 @@ After:
Restore
unlet! g:loclist
+ unlet! b:ale_loclist_msg_format
delfunction AddItem
@@ -162,3 +163,26 @@ Execute(Formatting with the linter name should work for the quickfix list):
\ },
\ ],
\ getqflist()
+
+Execute(The buffer loclist format option should take precedence):
+ let g:ale_loclist_msg_format = '(%linter%) %s'
+ let b:ale_loclist_msg_format = 'FOO %s'
+
+ call AddItem({'text': 'whatever'})
+ call ale#list#SetLists(bufnr(''), g:loclist)
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 1,
+ \ 'bufnr': bufnr(''),
+ \ 'col': 1,
+ \ 'valid': 1,
+ \ 'vcol': 0,
+ \ 'nr': 0,
+ \ 'type': 'E',
+ \ 'pattern': '',
+ \ 'text': 'FOO whatever',
+ \ },
+ \ ],
+ \ getloclist(0)