summaryrefslogtreecommitdiff
path: root/test/test_highlight_placement.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-10 00:02:49 +0100
committerw0rp <devw0rp@gmail.com>2017-07-10 00:02:49 +0100
commit82dd80c692bed7d9bdf0b9664b9222f4afb98fe2 (patch)
tree333c4393a4a8333dd2568327b61aac572751d6cb /test/test_highlight_placement.vader
parent6a84605c578ea844a02e429edb38ff2986bc308b (diff)
downloadale-82dd80c692bed7d9bdf0b9664b9222f4afb98fe2.zip
Fix #746 - Keep highlights from other plugins when buffers are hidden
Diffstat (limited to 'test/test_highlight_placement.vader')
-rw-r--r--test/test_highlight_placement.vader25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/test_highlight_placement.vader b/test/test_highlight_placement.vader
index 3fa45ed2..2e6a0ce3 100644
--- a/test/test_highlight_placement.vader
+++ b/test/test_highlight_placement.vader
@@ -120,17 +120,32 @@ Execute(Only ALE highlights should be restored when buffers are restored):
call matchaddpos('SomeOtherGroup', [[1, 1, 1]])
- " We should have one more match here.
- AssertEqual 2, len(GetMatchesWithoutIDs()), 'The highlights weren''t initially set!'
+ " We should have both highlights.
+ AssertEqual
+ \ [
+ \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]},
+ \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]},
+ \ ],
+ \ GetMatchesWithoutIDs()
call ale#highlight#BufferHidden(bufnr('%'))
- AssertEqual 0, len(GetMatchesWithoutIDs()), 'The highlights weren''t cleared!'
+ " We should remove our highlight, but not the other one.
+ AssertEqual
+ \ [
+ \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}
+ \ ],
+ \ GetMatchesWithoutIDs()
call ale#highlight#UpdateHighlights()
- " Only our matches should appear again.
- AssertEqual 1, len(GetMatchesWithoutIDs()), 'The highlights weren''t set again!'
+ " Our highlight should apper again.
+ AssertEqual
+ \ [
+ \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]},
+ \ {'group': 'ALEError', 'priority': 10, 'pos1': [3, 2, 1]},
+ \ ],
+ \ GetMatchesWithoutIDs()
Execute(Higlight end columns should set an appropriate size):
call ale#highlight#SetHighlights(bufnr('%'), [