summaryrefslogtreecommitdiff
path: root/test/test_highlight_placement.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_highlight_placement.vader')
-rw-r--r--test/test_highlight_placement.vader21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_highlight_placement.vader b/test/test_highlight_placement.vader
index 6a84e571..725faff4 100644
--- a/test/test_highlight_placement.vader
+++ b/test/test_highlight_placement.vader
@@ -1,5 +1,6 @@
Before:
Save g:ale_enabled
+ Save g:ale_set_signs
function! GenerateResults(buffer, output)
return [
@@ -258,3 +259,23 @@ Execute(Highlights should be cleared when ALE is disabled):
call ale#highlight#UpdateHighlights()
AssertEqual [], GetMatchesWithoutIDs()
+
+Execute(Line highlights should be set when signs are disabled):
+ let g:ale_set_signs = 0
+
+ call ale#highlight#SetHighlights(bufnr(''), [
+ \ {'bufnr': bufnr(''), 'type': 'E', 'lnum': 1, 'col': 1},
+ \ {'bufnr': bufnr(''), 'type': 'W', 'lnum': 2, 'col': 1},
+ \ {'bufnr': bufnr(''), 'type': 'I', 'lnum': 3, 'col': 1},
+ \])
+
+ AssertEqual
+ \ [
+ \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]},
+ \ {'group': 'ALEWarning', 'priority': 10, 'pos1': [2, 1, 1]},
+ \ {'group': 'ALEInfo', 'priority': 10, 'pos1': [3, 1, 1]},
+ \ {'group': 'ALEErrorLine', 'priority': 10, 'pos1': [1]},
+ \ {'group': 'ALEWarningLine', 'priority': 10, 'pos1': [2]},
+ \ {'group': 'ALEInfoLine', 'priority': 10, 'pos1': [3]},
+ \ ],
+ \ GetMatchesWithoutIDs()