Patch 8.1.0844
Problem: When timer fails test will hang forever.
Solution: Use reltime() to limit waiting time. (Ozaki Kiichi, closes #3878)
Files: src/testdir/test_timers.vim
*** ../vim-8.1.0843/src/testdir/test_timers.vim 2019-01-28 23:20:00.407634900
+0100
--- src/testdir/test_timers.vim 2019-01-29 20:34:41.123382637 +0100
***************
*** 257,265 ****
return
endif
let id = timer_start(20, {id -> feedkeys('x', 'L')})
let c = 0
! while c == 0
let c = getchar(0)
sleep 10m
endwhile
--- 257,267 ----
return
endif
+ " Measure the elapsed time to avoid a hang when it fails.
+ let start = reltime()
let id = timer_start(20, {id -> feedkeys('x', 'L')})
let c = 0
! while c == 0 && reltimefloat(reltime(start)) < 0.2
let c = getchar(0)
sleep 10m
endwhile
*** ../vim-8.1.0843/src/version.c 2019-01-29 20:17:25.554548212 +0100
--- src/version.c 2019-01-29 20:36:10.118765845 +0100
***************
*** 785,786 ****
--- 785,788 ----
{ /* Add new patch number below this line */
+ /**/
+ 844,
/**/
--
ARTHUR: You fight with the strength of many men, Sir knight.
I am Arthur, King of the Britons. [pause]
I seek the finest and the bravest knights in the land to join me
in my Court of Camelot. [pause]
You have proved yourself worthy; will you join me? [pause]
You make me sad. So be it. Come, Patsy.
BLACK KNIGHT: None shall pass.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.