To: vim_dev@googlegroups.com Subject: Patch 8.2.1013 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1013 Problem: Channel tests can be a bit flaky. Solution: Set the g:test_is_flaky flag in SetUp(). Files: src/testdir/test_channel.vim *** ../vim-8.2.1012/src/testdir/test_channel.vim 2020-04-29 22:30:09.313356305 +0200 --- src/testdir/test_channel.vim 2020-06-19 19:08:55.917485757 +0200 *************** *** 29,42 **** endif let s:chopt = {} call ch_log(g:testfunc) endfunc " Run "testfunc" after starting the server and stop the server afterwards. func s:run_server(testfunc, ...) call RunServer(s:testscript, a:testfunc, a:000) - - " communicating with a server can be flaky - let g:test_is_flaky = 1 endfunc " Return a list of open files. --- 29,42 ---- endif let s:chopt = {} call ch_log(g:testfunc) + + " Most tests use job_start(), which can be flaky + let g:test_is_flaky = 1 endfunc " Run "testfunc" after starting the server and stop the server afterwards. func s:run_server(testfunc, ...) call RunServer(s:testscript, a:testfunc, a:000) endfunc " Return a list of open files. *************** *** 455,461 **** func Test_connect_waittime() CheckFunction reltimefloat " this is timing sensitive - let g:test_is_flaky = 1 let start = reltime() let handle = ch_open('localhost:9876', s:chopt) --- 455,460 ---- *************** *** 1762,1770 **** endfunc func Test_cmd_parsing() ! if !has('unix') ! return ! endif call assert_false(filereadable("file with space")) let job = job_start('touch "file with space"') call WaitForAssert({-> assert_true(filereadable("file with space"))}) --- 1761,1768 ---- endfunc func Test_cmd_parsing() ! CheckUnix ! call assert_false(filereadable("file with space")) let job = job_start('touch "file with space"') call WaitForAssert({-> assert_true(filereadable("file with space"))}) *************** *** 1963,1971 **** endfunc func Test_keep_pty_open() ! if !has('unix') ! return ! endif let job = job_start(s:python . ' -c "import time;time.sleep(0.2)"', \ {'out_io': 'null', 'err_io': 'null', 'pty': 1}) --- 1961,1967 ---- endfunc func Test_keep_pty_open() ! CheckUnix let job = job_start(s:python . ' -c "import time;time.sleep(0.2)"', \ {'out_io': 'null', 'err_io': 'null', 'pty': 1}) *************** *** 2047,2055 **** endfunc func Test_job_exitval_and_termsig() ! if !has('unix') ! return ! endif " Terminate job normally let cmd = ['echo'] --- 2043,2049 ---- endfunc func Test_job_exitval_and_termsig() ! CheckUnix " Terminate job normally let cmd = ['echo'] *************** *** 2123,2128 **** --- 2117,2123 ---- " Do this last, it stops any channel log. func Test_zz_nl_err_to_out_pipe() + eval 'Xlog'->ch_logfile() call ch_log('Test_zz_nl_err_to_out_pipe()') let job = job_start(s:python . " test_channel_pipe.py", {'err_io': 'out'}) *************** *** 2214,2219 **** --- 2209,2215 ---- func Test_job_trailing_space_unix() CheckUnix CheckExecutable cat + let job = job_start("cat ", #{in_io: 'null'}) call WaitForAssert({-> assert_equal("dead", job_status(job))}) call assert_equal(0, job_info(job).exitval) *** ../vim-8.2.1012/src/version.c 2020-06-19 19:01:39.038497746 +0200 --- src/version.c 2020-06-19 19:09:49.845356801 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1013, /**/ -- Q: How do you tell the difference between a female cat and a male cat? A: You ask it a question and if HE answers, it's a male but, if SHE answers, it's a female. /// 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 ///