Mercurial > vim
changeset 8459:9fb171e8466d v7.4.1520
commit https://github.com/vim/vim/commit/d9d473ea124339c4dd173127db47c4583645ac2c
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 19:07:22 2016 +0100
patch 7.4.1520
Problem: Channel test: Waiting for a file to appear doesn't work.
Solution: In waitFor() ignore errors.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 08 Mar 2016 19:15:04 +0100 |
parents | 2d050fba6f73 |
children | a6b86b34003f |
files | src/testdir/test_channel.vim src/version.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -103,9 +103,12 @@ endfunc " Wait for up to a second for "expr" to become true. func s:waitFor(expr) for i in range(100) - if eval(a:expr) - return - endif + try + if eval(a:expr) + return + endif + catch + endtry sleep 10m endfor endfunc