mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 06:30:03 +08:00
84 lines
2.6 KiB
Plaintext
Vendored
84 lines
2.6 KiB
Plaintext
Vendored
Include: include/setup.vader
|
|
|
|
Execute (neomake#log uses &verbose):
|
|
Save g:neomake_verbose, &verbose
|
|
unlet! g:neomake_verbose
|
|
set verbose=0
|
|
|
|
unlet g:neomake_test_log_all_messages
|
|
|
|
call neomake#log#warning('msg.')
|
|
AssertEqual g:neomake_test_messages, [[1, 'msg.', {}]]
|
|
|
|
let g:neomake_test_messages = []
|
|
1verb call neomake#log#warning('msg.')
|
|
AssertEqual g:neomake_test_messages, [[1, 'msg.', {}]]
|
|
|
|
let g:neomake_test_messages = []
|
|
1verb call neomake#log#info('msg.')
|
|
AssertEqual g:neomake_test_messages, [[2, 'msg.', {}]]
|
|
|
|
let g:neomake_test_messages = []
|
|
2verb call neomake#log#info('msg.')
|
|
AssertEqual g:neomake_test_messages, [[2, 'msg.', {}]]
|
|
|
|
let g:neomake_test_messages = []
|
|
let g:neomake_verbose = 3
|
|
call neomake#log#warning('msg.')
|
|
AssertEqual g:neomake_test_messages, [[1, 'msg.', {}]]
|
|
|
|
let g:neomake_test_messages = []
|
|
let g:neomake_verbose = 1
|
|
0verb call neomake#log#warning('msg.')
|
|
AssertEqual g:neomake_test_messages, [[1, 'msg.', {}]]
|
|
|
|
let g:neomake_verbose = 0
|
|
NeomakeTestsResetMessages
|
|
0verb call neomake#log#warning('msg.')
|
|
AssertEqual g:neomake_test_messages, []
|
|
|
|
1verb call neomake#log#warning('msg.')
|
|
AssertNeomakeMessage 'msg.', 1
|
|
|
|
3verb call neomake#log#warning('msg.')
|
|
AssertNeomakeMessage 'msg.', 1
|
|
|
|
Execute (neomake#Make uses &verbose):
|
|
Save g:neomake_verbose, &verbose
|
|
unlet! g:neomake_verbose
|
|
set verbose=0
|
|
|
|
let maker = {
|
|
\ 'append_file': 0,
|
|
\ 'exe': 'echo',
|
|
\ 'args': ['1'],
|
|
\ }
|
|
let bufnr = bufnr('%')
|
|
|
|
unlet g:neomake_test_log_all_messages
|
|
|
|
" The default for g:neomake_verbose is 1, and ':2verb' displays level 3."
|
|
2verb call neomake#Make(1, [maker])
|
|
let make_id = neomake#GetStatus().last_make_id
|
|
NeomakeTestsWaitForFinishedJobs
|
|
|
|
let log_context = {'make_id': make_id, 'bufnr': bufnr}
|
|
AssertNeomakeMessage 'Adding &verbose (2) to verbosity level: 3.', 3, log_context
|
|
AssertNeomakeMessage 'Running makers: unnamed_maker.', 3, log_context
|
|
|
|
NeomakeTestsResetMessages
|
|
1verb let jobinfo = neomake#Make({'enabled_makers': [maker]})[0]
|
|
let make_id = jobinfo.make_id
|
|
NeomakeTestsWaitForFinishedJobs
|
|
if neomake#has_async_support()
|
|
AssertNeomakeMessage "Starting async job: echo 1.", 2, {'id': jobinfo.id, 'make_id': make_id, 'bufnr': bufnr}
|
|
else
|
|
AssertNeomakeMessage "Starting [string]: echo 1.", 2, {'id': jobinfo.id, 'make_id': make_id, 'bufnr': bufnr}
|
|
endif
|
|
|
|
let g:neomake_verbose = 3
|
|
0verb call neomake#Make(1, [maker])
|
|
let make_id = neomake#GetStatus().last_make_id
|
|
NeomakeTestsWaitForFinishedJobs
|
|
AssertNeomakeMessage 'Running makers: unnamed_maker.', 3, {'make_id': make_id, 'bufnr': bufnr}
|