To: vim_dev@googlegroups.com Subject: Patch 8.0.0495 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0495 Problem: The quotestar test uses a timer instead of a timeout, thus it cannot be rerun like a flaky test. Solution: Remove the timer and add a timeout. (Kazunobu Kuriyama) Files: src/testdir/test_quotestar.vim *** ../vim-8.0.0494/src/testdir/test_quotestar.vim 2017-03-19 21:01:09.721654997 +0100 --- src/testdir/test_quotestar.vim 2017-03-20 21:39:23.183541069 +0100 *************** *** 6,17 **** source shared.vim - let s:where = 0 - func Abort(id) - call assert_report('Test timed out at ' . s:where) - call FinishTesting() - endfunc - func Do_test_quotestar_for_macunix() if empty(exepath('pbcopy')) || empty(exepath('pbpaste')) return 'Test requires pbcopy(1) and pbpaste(1)' --- 6,11 ---- *************** *** 46,55 **** return 'GetVimCommand() failed' endif - " Some of these commands may hang when failing. - call timer_start(10000, 'Abort') - - let s:where = 1 let name = 'XVIMCLIPBOARD' let cmd .= ' --servername ' . name let g:job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'}) --- 40,45 ---- *************** *** 58,82 **** call assert_report('Cannot run the Vim server') return '' endif - let s:where = 2 " Takes a short while for the server to be active. call WaitFor('serverlist() =~ "' . name . '"') call assert_match(name, serverlist()) - let s:where = 3 " Clear the *-register of this vim instance. let @* = '' " Try to change the *-register of the server. call remote_foreground(name) - let s:where = 4 call remote_send(name, ":let @* = 'yes'\") ! let s:where = 5 ! call WaitFor('remote_expr("' . name . '", "@*") == "yes"') ! let s:where = 6 ! call assert_equal('yes', remote_expr(name, "@*")) ! let s:where = 7 " Check that the *-register of this vim instance is changed as expected. call assert_equal('yes', @*) --- 48,66 ---- call assert_report('Cannot run the Vim server') return '' endif " Takes a short while for the server to be active. call WaitFor('serverlist() =~ "' . name . '"') call assert_match(name, serverlist()) " Clear the *-register of this vim instance. let @* = '' " Try to change the *-register of the server. call remote_foreground(name) call remote_send(name, ":let @* = 'yes'\") ! call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"') ! call assert_equal('yes', remote_expr(name, "@*", "", 2)) " Check that the *-register of this vim instance is changed as expected. call assert_equal('yes', @*) *************** *** 94,115 **** else call remote_send(name, ":gui -f\") endif ! let s:where = 8 ! sleep 500m call remote_send(name, ":let @* = 'maybe'\") ! let s:where = 9 ! call WaitFor('remote_expr("' . name . '", "@*") == "maybe"') ! let s:where = 10 ! call assert_equal('maybe', remote_expr(name, "@*")) ! let s:where = 11 call assert_equal('maybe', @*) endif call remote_send(name, ":qa!\") - let s:where = 12 call WaitFor('job_status(g:job) == "dead"') - let s:where = 13 if job_status(g:job) != 'dead' call assert_report('Server did not exit') call job_stop(g:job, 'kill') --- 78,95 ---- else call remote_send(name, ":gui -f\") endif ! " Wait for the server to be up and answering requests. ! call WaitFor('remote_expr("' . name . '", "v:version", "", 1) != ""') ! call remote_send(name, ":let @* = 'maybe'\") ! call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "maybe"') ! call assert_equal('maybe', remote_expr(name, "@*", "", 2)) call assert_equal('maybe', @*) endif call remote_send(name, ":qa!\") call WaitFor('job_status(g:job) == "dead"') if job_status(g:job) != 'dead' call assert_report('Server did not exit') call job_stop(g:job, 'kill') *** ../vim-8.0.0494/src/version.c 2017-03-19 21:47:46.897119250 +0100 --- src/version.c 2017-03-20 21:41:15.442714338 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 495, /**/ -- hundred-and-one symptoms of being an internet addict: 171. You invent another person and chat with yourself in empty chat rooms. /// 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 ///