To: vim_dev@googlegroups.com Subject: Patch 7.4.1543 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1543 Problem: Channel log methods are not tested. Solution: Log job activity and check it. Files: src/testdir/test_channel.vim *** ../vim-7.4.1542/src/testdir/test_channel.vim 2016-03-12 15:39:35.452054414 +0100 --- src/testdir/test_channel.vim 2016-03-12 15:49:47.113679150 +0100 *************** *** 517,522 **** --- 517,523 ---- if !has('job') return endif + call ch_logfile('Xlog') call ch_log('Test_nl_err_to_out_pipe()') let job = job_start(s:python . " test_channel_pipe.py", {'err-io': 'out'}) call assert_equal("run", job_status(job)) *************** *** 529,534 **** --- 530,561 ---- call assert_equal("wrong", ch_readraw(handle)) finally 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 endfunc *** ../vim-7.4.1542/src/version.c 2016-03-12 15:39:35.456054373 +0100 --- src/version.c 2016-03-12 15:50:44.053085789 +0100 *************** *** 745,746 **** --- 745,748 ---- { /* Add new patch number below this line */ + /**/ + 1543, /**/ -- One difference between a man and a machine is that a machine is quiet when well oiled. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///