summaryrefslogtreecommitdiff
path: root/test/test_pattern_options.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-06-01 21:03:22 +0100
committerw0rp <devw0rp@gmail.com>2018-06-01 21:03:22 +0100
commit014d27c882b10c6c6ba1b32ec0ad1ce993b108eb (patch)
tree76caa2a240b903ee74873dadc651a4fc3703c4ab /test/test_pattern_options.vader
parentfae9167083ed9df5743f6bf4e2b040f880601e49 (diff)
downloadale-014d27c882b10c6c6ba1b32ec0ad1ce993b108eb.zip
#1621 - Tolerate SetOptions calls when ALE is loaded in a weird way
Diffstat (limited to 'test/test_pattern_options.vader')
-rw-r--r--test/test_pattern_options.vader11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_pattern_options.vader b/test/test_pattern_options.vader
index 0e26eaaa..f439afbd 100644
--- a/test/test_pattern_options.vader
+++ b/test/test_pattern_options.vader
@@ -90,3 +90,14 @@ Execute(Patterns should be applied after the Dictionary changes):
call ale#pattern_options#SetOptions(bufnr(''))
AssertEqual 666, b:some_option
+
+Execute(SetOptions should tolerate settings being unset):
+ " This might happen if ALE is loaded in a weird way, so tolerate it.
+ unlet! g:ale_pattern_options
+ unlet! g:ale_pattern_options_enabled
+
+ call ale#pattern_options#SetOptions(bufnr(''))
+
+ let g:ale_pattern_options_enabled = 1
+
+ call ale#pattern_options#SetOptions(bufnr(''))