diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_highlight_clearing.vader | 4 | ||||
-rw-r--r-- | test/test_highlight_placement.vader | 26 |
2 files changed, 26 insertions, 4 deletions
diff --git a/test/test_highlight_clearing.vader b/test/test_highlight_clearing.vader deleted file mode 100644 index bf805924..00000000 --- a/test/test_highlight_clearing.vader +++ /dev/null @@ -1,4 +0,0 @@ -Execute(ALE should be able to queue highlights and clear them for some other buffer): - " We'll just make sure that this doesn't blow up. - call ale#highlight#SetHighlights(bufnr('%') + 1, []) - call ale#highlight#UnqueueHighlights(bufnr('%') + 1) 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() |