summaryrefslogtreecommitdiff
path: root/test/test_virtualtext.vader
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@users.noreply.github.com>2023-01-29 17:25:09 +0000
committerGitHub <noreply@github.com>2023-01-29 17:25:09 +0000
commit116d713f63c7a81663fa53efa10e34649c9479e3 (patch)
tree0ca5ed37b4320e70901de6b9bcafee53c259a2aa /test/test_virtualtext.vader
parent0af4899605af26dd8ea7fe79acff6ab99f6532b2 (diff)
downloadale-116d713f63c7a81663fa53efa10e34649c9479e3.zip
diagnostics: support sending ALE output to Neovim's diagnostics API (#4345)
Support replacing ALE's display of problems with sending problems to the Neovim diagnostics API. :help g:ale_use_neovim_diagnostics_api Co-authored-by: David Balatero <dbalatero@users.noreply.github.com> Co-authored-by: Georgi Angelchev <angelchev@live.co.uk> Co-authored-by: w0rp <devw0rp@gmail.com>
Diffstat (limited to 'test/test_virtualtext.vader')
-rw-r--r--test/test_virtualtext.vader15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_virtualtext.vader b/test/test_virtualtext.vader
index 8fc1ead5..1d34c036 100644
--- a/test/test_virtualtext.vader
+++ b/test/test_virtualtext.vader
@@ -4,6 +4,7 @@ Before:
Save g:ale_virtualtext_delay
Save g:ale_virtualtext_prefix
Save b:ale_virtualtext_prefix
+ Save g:ale_use_neovim_diagnostics_api
call ale#virtualtext#ResetDataForTests()
@@ -36,6 +37,7 @@ Before:
\ ],
\ },
\}
+ let g:ale_use_neovim_diagnostics_api = 0
After:
Restore
@@ -177,3 +179,16 @@ Execute(We should set errors across all lines):
\ map(prop_list(2), {_, v -> v.type})
endif
endif
+
+Execute(We should not set cursor messages when Neovim diagnostics are enabled):
+ let g:ale_use_neovim_diagnostics_api = 1
+
+ if has('patch-9.0.0297') || has('nvim-0.8.0')
+ let g:ale_virtualtext_cursor = 'current'
+ call cursor(1, 1)
+ call ale#virtualtext#ShowCursorWarningWithDelay()
+ " Tick the timer.
+ sleep 1ms
+
+ AssertEqual '', ale#virtualtext#GetLastMessageForTests()
+ endif