summaryrefslogtreecommitdiff
path: root/test/test_ale_toggle.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-10-28 15:41:14 +0100
committerw0rp <devw0rp@gmail.com>2017-10-28 15:41:14 +0100
commitea3a8e3c62d3051fee9342ece2e04bcd04b392b6 (patch)
tree36507761c15f0264877d9979b0f5a10f91aaa3c3 /test/test_ale_toggle.vader
parent6e681d9066bde1f2a6b7583fa91e9c94cfffb11e (diff)
downloadale-ea3a8e3c62d3051fee9342ece2e04bcd04b392b6.zip
#817 Move code for toggling ALE to its own file
Diffstat (limited to 'test/test_ale_toggle.vader')
-rw-r--r--test/test_ale_toggle.vader29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/test_ale_toggle.vader b/test/test_ale_toggle.vader
index f3dbf102..733ae35d 100644
--- a/test/test_ale_toggle.vader
+++ b/test/test_ale_toggle.vader
@@ -2,6 +2,7 @@ Before:
Save g:ale_buffer_info
Save g:ale_set_signs
Save g:ale_set_lists_synchronously
+ Save g:ale_run_synchronously
let g:ale_set_signs = 1
let g:ale_set_lists_synchronously = 1
@@ -175,3 +176,31 @@ Execute(ALEToggle should skip filename keys and preserve them):
\ 'history': [],
\ },
\ get(g:ale_buffer_info, '/foo/bar/baz.txt', {})
+
+Execute(ALEDisable should reset everything and stay disabled):
+ " We can just lint sychronously for these tests.
+ let g:ale_run_synchronously = 1
+
+ call ale#Lint()
+
+ AssertEqual g:expected_loclist, getloclist(0)
+
+ ALEDisable
+
+ AssertEqual [], getloclist(0)
+ AssertEqual 0, g:ale_enabled
+
+ ALEDisable
+
+ AssertEqual [], getloclist(0)
+ AssertEqual 0, g:ale_enabled
+
+Execute(ALEEnable should enable ALE and lint again):
+ " We can just lint sychronously for these tests.
+ let g:ale_enabled = 0
+ let g:ale_run_synchronously = 1
+
+ ALEEnable
+
+ AssertEqual g:expected_loclist, getloclist(0)
+ AssertEqual 1, g:ale_enabled