Patch 8.2.0398
Problem: Profile test fails when two functions take same time.
Solution: Add a short sleep in once function. (closes #5797)
Files: src/testdir/test_profile.vim
*** ../vim-8.2.0397/src/testdir/test_profile.vim 2019-09-18 22:02:29.000000000 +0200
--- src/testdir/test_profile.vim 2020-03-17 20:56:15.107056562 +0100
***************
*** 17,22 ****
--- 17,23 ----
while l:count > 0
let l:count = l:count - 1
endwhile
+ sleep 1m
endfunc
func! Foo3()
endfunc
***************
*** 52,58 ****
" - Unlike Foo3(), Foo2() should not be deleted since there is a check
" for v:profiling.
" - Bar() is not reported since it does not match "profile func Foo*".
! call assert_equal(30, len(lines))
call assert_equal('FUNCTION Foo1()', lines[0])
call assert_match('Defined:.*Xprofile_func.vim:3', lines[1])
--- 53,59 ----
" - Unlike Foo3(), Foo2() should not be deleted since there is a check
" for v:profiling.
" - Bar() is not reported since it does not match "profile func Foo*".
! call assert_equal(31, len(lines))
call assert_equal('FUNCTION Foo1()', lines[0])
call assert_match('Defined:.*Xprofile_func.vim:3', lines[1])
***************
*** 72,88 ****
call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[16])
call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[17])
call assert_match('^\s*101\s\+.*\sendwhile$', lines[18])
! call assert_equal('', lines[19])
! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[20])
! call assert_equal('count total (s) self (s) function', lines[21])
! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[22])
! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[23])
! call assert_equal('', lines[24])
! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[25])
! call assert_equal('count total (s) self (s) function', lines[26])
! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[27])
! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[28])
! call assert_equal('', lines[29])
call delete('Xprofile_func.vim')
call delete('Xprofile_func.log')
--- 73,90 ----
call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[16])
call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[17])
call assert_match('^\s*101\s\+.*\sendwhile$', lines[18])
! call assert_match('^\s*1\s\+.\+sleep 1m$', lines[19])
! call assert_equal('', lines[20])
! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[21])
! call assert_equal('count total (s) self (s) function', lines[22])
! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[23])
! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[24])
! call assert_equal('', lines[25])
! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[26])
! call assert_equal('count total (s) self (s) function', lines[27])
! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[28])
! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[29])
! call assert_equal('', lines[30])
call delete('Xprofile_func.vim')
call delete('Xprofile_func.log')
*** ../vim-8.2.0397/src/version.c 2020-03-16 22:08:42.541514809 +0100
--- src/version.c 2020-03-17 20:55:24.151231572 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 398,
/**/
--
The greatest lies of all time:
(1) The check is in the mail.
(2) We have a really challenging assignment for you.
(3) I love you.
(4) All bugs have been fixed.
(5) This won't hurt a bit.
(6) Honey, I just need to debug this program and be home in 5 minutes.
(7) I have just sent you an e-mail about that.
(8) Of course I'll respect you in the morning.
(9) I'm from the government, and I'm here to help you.
/// Bram Moolenaar -- Br...@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 ///