0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1543

Problem:    Channel log methods are not tested.
Solution:   Log job activity and check it.
This commit is contained in:
Bram Moolenaar
2016-03-12 15:51:44 +01:00
parent 1adda3403d
commit 5a6ec52392
2 changed files with 29 additions and 0 deletions

View File

@@ -517,6 +517,7 @@ func Test_nl_err_to_out_pipe()
if !has('job') if !has('job')
return return
endif endif
call ch_logfile('Xlog')
call ch_log('Test_nl_err_to_out_pipe()') call ch_log('Test_nl_err_to_out_pipe()')
let job = job_start(s:python . " test_channel_pipe.py", {'err-io': 'out'}) let job = job_start(s:python . " test_channel_pipe.py", {'err-io': 'out'})
call assert_equal("run", job_status(job)) call assert_equal("run", job_status(job))
@@ -529,6 +530,32 @@ func Test_nl_err_to_out_pipe()
call assert_equal("wrong", ch_readraw(handle)) call assert_equal("wrong", ch_readraw(handle))
finally finally
call job_stop(job) call job_stop(job)
call ch_logfile('')
let loglines = readfile('Xlog')
call assert_true(len(loglines) > 10)
let found_test = 0
let found_send = 0
let found_recv = 0
let found_stop = 0
for l in loglines
if l =~ 'Test_nl_err_to_out_pipe'
let found_test = 1
endif
if l =~ 'SEND on.*echo something'
let found_send = 1
endif
if l =~ 'RECV on.*something'
let found_recv = 1
endif
if l =~ 'Stopping job with'
let found_stop = 1
endif
endfor
call assert_equal(1, found_test)
call assert_equal(1, found_send)
call assert_equal(1, found_recv)
call assert_equal(1, found_stop)
call delete('Xlog')
endtry endtry
endfunc endfunc

View File

@@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1543,
/**/ /**/
1542, 1542,
/**/ /**/