summaryrefslogtreecommitdiff
path: root/test/test_cursor_warnings.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-12-19 14:43:18 +0000
committerw0rp <devw0rp@gmail.com>2017-12-19 14:43:24 +0000
commitd2bea5c3101e9f198492efb8ca294e63e62415a4 (patch)
tree6a8315a981950bcfb8e4420ef158bc9f2c35c3c0 /test/test_cursor_warnings.vader
parenta7d51afda5934636ede2af39cf99576b7e583dff (diff)
downloadale-d2bea5c3101e9f198492efb8ca294e63e62415a4.zip
Allow the cursor messages to be disabled while Vim is running
Diffstat (limited to 'test/test_cursor_warnings.vader')
-rw-r--r--test/test_cursor_warnings.vader11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_cursor_warnings.vader b/test/test_cursor_warnings.vader
index f112d8dc..19592217 100644
--- a/test/test_cursor_warnings.vader
+++ b/test/test_cursor_warnings.vader
@@ -1,5 +1,6 @@
Before:
Save g:ale_echo_msg_format
+ Save g:ale_echo_cursor
let g:ale_buffer_info = {
\ bufnr('%'): {
@@ -66,6 +67,7 @@ Before:
let g:ale_set_loclist = 0
let g:ale_set_signs = 0
let g:ale_set_highlights = 0
+ let g:ale_echo_cursor = 1
function GetLastMessage()
redir => l:output
@@ -222,3 +224,12 @@ Execute(The buffer message format option should take precedence):
call ale#cursor#EchoCursorWarning()
AssertEqual 'FOO Some information', GetLastMessage()
+
+Execute(The cursor message shouldn't be echoed if the option is off):
+ let g:ale_echo_cursor = 0
+ echom 'foo'
+
+ call cursor(1, 1)
+ call ale#cursor#EchoCursorWarning()
+
+ AssertEqual 'foo', GetLastMessage()