Mercurial > vim
comparison src/testdir/shared.vim @ 13650:87ffb7f85b28 v8.0.1697
patch 8.0.1697: various tests are still a bit flaky
commit https://github.com/vim/vim/commit/769e9d21ac3e8dff43b9ef5e46cdc4523833b51e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 11 20:53:49 2018 +0200
patch 8.0.1697: various tests are still a bit flaky
Problem: Various tests are still a bit flaky.
Solution: Increase the default wait time to five seconds.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 11 Apr 2018 21:00:07 +0200 |
parents | aa6ecb272236 |
children | 415185e2c970 |
comparison
equal
deleted
inserted
replaced
13649:074b4d214dd8 | 13650:87ffb7f85b28 |
---|---|
111 else | 111 else |
112 call system("pkill -f " . a:cmd) | 112 call system("pkill -f " . a:cmd) |
113 endif | 113 endif |
114 endfunc | 114 endfunc |
115 | 115 |
116 " Wait for up to a second for "expr" to become true. "expr" can be a | 116 " Wait for up to five seconds for "expr" to become true. "expr" can be a |
117 " stringified expression to evaluate, or a funcref without arguments. | 117 " stringified expression to evaluate, or a funcref without arguments. |
118 " A second argument can be used to specify a different timeout in msec. | 118 " A second argument can be used to specify a different timeout in msec. |
119 " | 119 " |
120 " Return time slept in milliseconds. With the +reltime feature this can be | 120 " Return time slept in milliseconds. With the +reltime feature this can be |
121 " more than the actual waiting time. Without +reltime it can also be less. | 121 " more than the actual waiting time. Without +reltime it can also be less. |
122 func WaitFor(expr, ...) | 122 func WaitFor(expr, ...) |
123 let timeout = get(a:000, 0, 1000) | 123 let timeout = get(a:000, 0, 5000) |
124 " using reltime() is more accurate, but not always available | 124 " using reltime() is more accurate, but not always available |
125 if has('reltime') | 125 if has('reltime') |
126 let start = reltime() | 126 let start = reltime() |
127 else | 127 else |
128 let slept = 0 | 128 let slept = 0 |