Mercurial > vim
changeset 12128:2f4eb2e10766 v8.0.0944
patch 8.0.0944: test_profile is a little bit flaky
commit https://github.com/vim/vim/commit/d21b16f3c0c676bfe3a37aef1ac3118e1ecded60
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 14 23:13:30 2017 +0200
patch 8.0.0944: test_profile is a little bit flaky
Problem: Test_profile is a little bit flaky.
Solution: Accept a match when self and total time are the same. (James
McCoy, closes #1972)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 14 Aug 2017 23:15:04 +0200 |
parents | faa60110e361 |
children | 532f6ee4a3c7 |
files | src/testdir/test_profile.vim src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_profile.vim +++ b/src/testdir/test_profile.vim @@ -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])