All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 Save g:ale_filetype_blacklist
3 Save g:ale_maximum_file_size
9 call ale#test#SetDirectory('/testplugin/test')
11 let b:funky_command_created = 0
13 runtime autoload/ale/util.vim
15 function! ale#util#Mode(...) abort
19 " We will test for the existence of this command, so create one if needed.
20 if !exists(':CtrlPFunky')
21 command CtrlPFunky echo
22 let b:funky_command_created = 1
28 call ale#test#RestoreDirectory()
30 if b:funky_command_created
32 let b:funky_command_created = 0
35 unlet! b:funky_command_created
42 runtime autoload/ale/util.vim
44 Given foobar(An empty file):
45 Execute(ALE shouldn't do much of anything for ctrlp-funky buffers):
46 Assert !ale#ShouldDoNothing(bufnr('')), 'The preliminary check failed'
48 let &l:statusline = '%#CtrlPMode2# prt %*%#CtrlPMode1# line %* <mru>={%#CtrlPMode1# funky %*}=<fil> <-> %=%<%#CtrlPMode2# %{getcwd()} %*'
50 Assert ale#ShouldDoNothing(bufnr(''))
52 Execute(ALE shouldn't try to check buffers with '.' as the filename):
55 \ ale#ShouldDoNothing(bufnr('')),
56 \ 'ShouldDoNothing() was 1 for some other reason'
58 silent! noautocmd file .
60 Assert ale#ShouldDoNothing(bufnr(''))
62 Execute(DoNothing should return 1 when the filetype is empty):
65 \ ale#ShouldDoNothing(bufnr('')),
66 \ 'ShouldDoNothing() was 1 for some other reason'
70 AssertEqual 1, ale#ShouldDoNothing(bufnr(''))
72 Execute(DoNothing should return 1 when an operator is pending):
73 let b:fake_mode = 'no'
75 AssertEqual 1, ale#ShouldDoNothing(bufnr(''))
77 Execute(DoNothing should return 1 for diff buffers):
80 AssertEqual 1, ale#ShouldDoNothing(bufnr(''))
82 Execute(The DoNothing check should work if the ALE globals aren't defined):
83 unlet! g:ale_filetype_blacklist
84 unlet! g:ale_maximum_file_size
87 " This shouldn't throw exceptions.
88 call ale#ShouldDoNothing(bufnr(''))