diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-13 23:27:02 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-13 23:27:02 +0100 |
commit | 4c6c5bf84fa31ab18ff83122c12b7e8edb18bd1e (patch) | |
tree | 6150657f24ba48b20486ce6d97b62b8a0ea7134e /test/test_highlight_placement.vader | |
parent | b50ae96413ef34c1ab631507d6763e7667fe8c85 (diff) | |
download | ale-4c6c5bf84fa31ab18ff83122c12b7e8edb18bd1e.zip |
#697 - Remove highlights more thoroughly
Diffstat (limited to 'test/test_highlight_placement.vader')
-rw-r--r-- | test/test_highlight_placement.vader | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test_highlight_placement.vader b/test/test_highlight_placement.vader index 2e6a0ce3..02f570b9 100644 --- a/test/test_highlight_placement.vader +++ b/test/test_highlight_placement.vader @@ -204,3 +204,29 @@ Execute(Highlighting should support errors spanning many lines): \ }, \ ], \ GetMatchesWithoutIDs() + \ +Execute(Highlights should always be cleared when the buffer highlight list is empty): + " Add our highlights and something else. + call matchaddpos('ALEError', [[1, 1, 1]]) + call matchaddpos('SomeOtherGroup', [[1, 1, 1]]) + + AssertEqual + \ [ + \ {'group': 'ALEError', 'priority': 10, 'pos1': [1, 1, 1]}, + \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}, + \ ], + \ GetMatchesWithoutIDs() + + " Set the List we use for holding highlights for buffers. + let b:ale_highlight_items = [] + + " Call the function for updating the highlights called when buffers + " are entered, or when problems are presented. + call ale#highlight#UpdateHighlights() + + " Check that we remove our highlights. + AssertEqual + \ [ + \ {'group': 'SomeOtherGroup', 'priority': 10, 'pos1': [1, 1, 1]}, + \ ], + \ GetMatchesWithoutIDs() |