summaryrefslogtreecommitdiff
path: root/test/test_should_do_nothing_conditions.vader
diff options
context:
space:
mode:
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