summaryrefslogtreecommitdiff
path: root/test/test_highlight_placement.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-17 14:29:51 +0000
committerw0rp <devw0rp@gmail.com>2017-11-17 14:29:57 +0000
commit5635b3c86437f22123a19601bebcaa335c1ceb2e (patch)
tree9610581c9bea3176e67d1e65f66ef4f51db12782 /test/test_highlight_placement.vader
parent22ec81e1de48cf442238dac9f85a579e04bf70cb (diff)
downloadale-5635b3c86437f22123a19601bebcaa335c1ceb2e.zip
Fix #741 - Set highlights for entire lines when signs are disabled
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()