]> granicus.if.org Git - vim/commitdiff
patch 8.0.0944: test_profile is a little bit flaky v8.0.0944
authorBram Moolenaar <Bram@vim.org>
Mon, 14 Aug 2017 21:13:30 +0000 (23:13 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 14 Aug 2017 21:13:30 +0000 (23:13 +0200)
Problem:    Test_profile is a little bit flaky.
Solution:   Accept a match when self and total time are the same. (James
            McCoy, closes #1972)

src/testdir/test_profile.vim
src/version.c

index 5f15d51b4719be8d66461fb87cc894f521bbe85a..f0ef923f3075056996855b3393d3afc6bfbbcc06 100644 (file)
@@ -121,7 +121,8 @@ func Test_profile_file()
   " First line of loop executes one more time than body to detect end of loop.
   call assert_match('^\s*22\s\+\d\+\.\d\+\s\+for i in range(10)$',    lines[8])
   call assert_equal('                              " a comment',      lines[9])
-  call assert_match('^\s*20\s\+\d\+\.\d\+\s\+\d\+\.\d\+\s\+call Foo()$', lines[10])
+  " if self and total are equal we only get one number
+  call assert_match('^\s*20\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[10])
   call assert_match('^\s*20\s\+\d\+\.\d\+\s\+endfor$',                lines[11])
   " if self and total are equal we only get one number
   call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12])
index 1bb02a1ccf50584333365cb24358cf4c09e84bc7..882e3da52727165ea28089c311dda3cd409ad97a 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    944,
 /**/
     943,
 /**/