diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-19 22:55:06 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-19 22:55:06 +0100 |
commit | d8dcc56af58d1545cf3a7a9f6160d8ba6ad39923 (patch) | |
tree | 8497fcf8f62d8806fa2a5a6600bcb4a7cb8654d7 /test/test_highlight_placement.vader | |
parent | 72449d7cb154ec16dee95fac76c487c28f7d48df (diff) | |
download | ale-d8dcc56af58d1545cf3a7a9f6160d8ba6ad39923.zip |
Remove error highlights when buffers are cleaned up
Diffstat (limited to 'test/test_highlight_placement.vader')
-rw-r--r-- | test/test_highlight_placement.vader | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_highlight_placement.vader b/test/test_highlight_placement.vader index 52e861d9..bca7bfda 100644 --- a/test/test_highlight_placement.vader +++ b/test/test_highlight_placement.vader @@ -74,3 +74,20 @@ Execute(Existing highlights should be kept): \ {'group': 'ALEWarning', 'id': 8, 'priority': 10, 'pos1': [4, 1, 1]}, \ ], \ getmatches() + +" This test is important for preventing ALE from showing highlights for +" the wrong files. +Execute(Highlights set by ALE should be removed when buffer cleanup is done): + call ale#engine#InitBufferInfo(bufnr('%')) + + call ale#highlight#SetHighlights(bufnr('%'), [ + \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, + \]) + + AssertEqual + \ [{'group': 'ALEError', 'id': 9, 'priority': 10, 'pos1': [3, 2, 1]}], + \ getmatches() + + call ale#cleanup#Buffer(bufnr('%')) + + AssertEqual [], getmatches() |