To: vim_dev@googlegroups.com Subject: Patch 8.1.1738 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- 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 ///