summaryrefslogtreecommitdiff
path: root/test/sign
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-21 22:42:27 +0100
committerw0rp <devw0rp@gmail.com>2017-05-21 22:42:27 +0100
commitb67c103d0604504ce957fdeff6ecc8162d085529 (patch)
tree1c0f87f5f0e2675677e4ed1bb62c0ec4a11e21c5 /test/sign
parent3a289dab6b6581586d42204e5e8d56a1489aa75c (diff)
downloadale-b67c103d0604504ce957fdeff6ecc8162d085529.zip
#309 Add an option for changing the sign column color when problems are detected
Diffstat (limited to 'test/sign')
-rw-r--r--test/sign/test_sign_column_highlighting.vader22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/sign/test_sign_column_highlighting.vader b/test/sign/test_sign_column_highlighting.vader
new file mode 100644
index 00000000..da8bac29
--- /dev/null
+++ b/test/sign/test_sign_column_highlighting.vader
@@ -0,0 +1,22 @@
+Before:
+ function! ParseSignColumnHighlight() abort
+ redir => l:output
+ silent highlight SignColumn
+ redir end
+
+ return join(split(l:output)[2:])
+ endfunction
+
+ let g:sign_highlight = ParseSignColumnHighlight()
+
+After:
+ delfunction ParseSignColumnHighlight
+ execute 'highlight SignColumn ' . g:sign_highlight
+ unlet! g:sign_highlight
+
+Execute(The SignColumn highlight should be set and reset):
+ call ale#sign#SetSignColumnHighlight(1)
+ AssertEqual 'links to ALESignColumnWithErrors', ParseSignColumnHighlight()
+
+ call ale#sign#SetSignColumnHighlight(0)
+ AssertEqual 'links to ALESignColumnWithoutErrors', ParseSignColumnHighlight()