summaryrefslogtreecommitdiff
path: root/test/test_cursor_warnings.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_cursor_warnings.vader
parent0cb8130d0e65d9a239c43ddb21d2f89b2815f10d (diff)
downloadale-597507e5197ef51037d01d30ad819a048eea9c9b.zip
Make the message formats configurable with buffer local variables
Diffstat (limited to 'test/test_cursor_warnings.vader')
-rw-r--r--test/test_cursor_warnings.vader10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_cursor_warnings.vader b/test/test_cursor_warnings.vader
index c6dc5269..f112d8dc 100644
--- a/test/test_cursor_warnings.vader
+++ b/test/test_cursor_warnings.vader
@@ -89,6 +89,7 @@ After:
let g:ale_buffer_info = {}
unlet! g:output
+ unlet! b:ale_loclist_msg_format
delfunction GetLastMessage
@@ -212,3 +213,12 @@ Execute(The %code% and %ifcode% should be removed when there's no code):
call ale#cursor#EchoCursorWarning()
AssertEqual 'Some information', GetLastMessage()
+
+Execute(The buffer message format option should take precedence):
+ let g:ale_echo_msg_format = '%(code) %%s'
+ let b:ale_echo_msg_format = 'FOO %s'
+
+ call cursor(1, 14)
+ call ale#cursor#EchoCursorWarning()
+
+ AssertEqual 'FOO Some information', GetLastMessage()