Patch 8.1.1738
Problem:    Testing lambda with timer is slow.
Solution:   Do not test timer accuracy, only that it works. (Daniel Hahler,
            closes #4723)
Files:      src/testdir/test_lambda.vim


*** ../vim-8.1.1737/src/testdir/test_lambda.vim 2019-01-13 15:15:54.388762907 
+0100
--- src/testdir/test_lambda.vim 2019-07-24 13:02:43.988667863 +0200
***************
*** 26,45 ****
    let s:n = 0
    let s:timer_id = 0
    func! s:Foo()
!     "let n = 0
!     let s:timer_id = timer_start(50, {-> execute("let s:n += 1 | echo s:n", 
"")}, {"repeat": -1})
    endfunc
  
    call s:Foo()
!   sleep 200ms
    " do not collect lambda
    call test_garbagecollect_now()
    let m = s:n
!   sleep 200ms
    call timer_stop(s:timer_id)
!   call assert_true(m > 1)
!   call assert_true(s:n > m + 1)
!   call assert_true(s:n < 9)
  endfunc
  
  func Test_lambda_with_partial()
--- 26,57 ----
    let s:n = 0
    let s:timer_id = 0
    func! s:Foo()
!     let s:timer_id = timer_start(10, {-> execute("let s:n += 1 | echo s:n", 
"")}, {"repeat": -1})
    endfunc
  
    call s:Foo()
!   " check timer works
!   for i in range(0, 10)
!     if s:n > 0
!       break
!     endif
!     sleep 10m
!   endfor
! 
    " do not collect lambda
    call test_garbagecollect_now()
+ 
+   " check timer still works
    let m = s:n
!   for i in range(0, 10)
!     if s:n > m
!       break
!     endif
!     sleep 10m
!   endfor
! 
    call timer_stop(s:timer_id)
!   call assert_true(s:n > m)
  endfunc
  
  func Test_lambda_with_partial()
*** ../vim-8.1.1737/src/version.c       2019-07-23 23:00:04.863109796 +0200
--- src/version.c       2019-07-24 13:04:09.632302434 +0200
***************
*** 779,780 ****
--- 779,782 ----
  {   /* Add new patch number below this line */
+ /**/
+     1738,
  /**/

-- 
./configure
Checking whether build environment is sane ...
build environment is grinning and holding a spatula.  Guess not.

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201907241108.x6OB8hSi004908%40masaka.moolenaar.net.

Raspunde prin e-mail lui