]> granicus.if.org Git - vim/commitdiff
patch 8.0.0194: profile tests fails if total and self time are equal v8.0.0194
authorBram Moolenaar <Bram@vim.org>
Sun, 15 Jan 2017 20:12:48 +0000 (21:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 15 Jan 2017 20:12:48 +0000 (21:12 +0100)
Problem:    Profile tests fails if total and self time are equal.
Solution:   Make one time optional.

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

index 36c05683d537b0e4e2b6de4f77cf6fc6bbb9aa6f..23d148e47d1b9b955a2d2ffdab1ccf2004163125 100644 (file)
@@ -113,7 +113,8 @@ func Test_profile_file()
   call assert_equal('                              " a comment',      lines[9])
   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])
-  call assert_match('^\s*2\s\+\d\+\.\d\+\s\+\d\+\.\d\+\s\+call Foo()$', lines[12])
+  " 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])
   call assert_equal('',                                               lines[13])
 
   call delete('Xprofile_file.vim')
index 401f79fe38426e133cf7e62fe22bcce00a22a888..cfb4e5969f4a54cb12d84c8a177e803940aa7f6c 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    194,
 /**/
     193,
 /**/