summaryrefslogtreecommitdiff
path: root/test/test_should_do_nothing_conditions.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-05-28 17:38:14 +0100
committerw0rp <devw0rp@gmail.com>2018-05-28 17:38:14 +0100
commit18509195f575c5753d3b30ff87040674cca6ce01 (patch)
tree01cdfa7745491fe8664fdb8b2cfa26e8f1a05d13 /test/test_should_do_nothing_conditions.vader
parentce89d93e1c7b0e135ad88414fe1c556b4a4b3c3e (diff)
downloadale-18509195f575c5753d3b30ff87040674cca6ce01.zip
#1524 Do not try to check buffers with empty filetypes
Diffstat (limited to 'test/test_should_do_nothing_conditions.vader')
-rw-r--r--test/test_should_do_nothing_conditions.vader11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_should_do_nothing_conditions.vader b/test/test_should_do_nothing_conditions.vader
index 85874e53..062ab875 100644
--- a/test/test_should_do_nothing_conditions.vader
+++ b/test/test_should_do_nothing_conditions.vader
@@ -26,6 +26,7 @@ After:
unlet! b:funky_command_created
+Given foobar(An empty file):
Execute(ALE shouldn't do much of anything for ctrlp-funky buffers):
Assert !ale#ShouldDoNothing(bufnr('')), 'The preliminary check failed'
@@ -43,6 +44,16 @@ Execute(ALE shouldn't try to check buffers with '.' as the filename):
Assert ale#ShouldDoNothing(bufnr(''))
+Execute(DoNothing should return 0 when the filetype is empty):
+ AssertEqual
+ \ 0,
+ \ ale#ShouldDoNothing(bufnr('')),
+ \ 'ShouldDoNothing() was 1 for some other reason'
+
+ set filetype=
+
+ AssertEqual 1, ale#ShouldDoNothing(bufnr(''))
+
Execute(The DoNothing check should work if the ALE globals aren't defined):
unlet! g:ale_filetype_blacklist
unlet! g:ale_maximum_file_size